pyspark.pandas.Series.copy

Series.copy(deep: bool = True) → pyspark.pandas.series.Series

Make a copy of this object’s indices and data.

Parameters
deepbool, default True

this parameter is not supported but just dummy parameter to match pandas.

Returns
copySeries

Examples

>>> s = ps.Series([1, 2], index=["a", "b"])
>>> s
a    1
b    2
dtype: int64
>>> s_copy = s.copy()
>>> s_copy
a    1
b    2
dtype: int64