pyspark.pandas.Series.to_pandas

Series.to_pandas() → pandas.core.series.Series[source]

Return a pandas Series.

Note

This method should only be used if the resulting pandas object is expected to be small, as all the data is loaded into the driver’s memory.

Examples

>>> df = ps.DataFrame([(.2, .3), (.0, .6), (.6, .0), (.2, .1)], columns=['dogs', 'cats'])
>>> df['dogs'].to_pandas()
0    0.2
1    0.0
2    0.6
3    0.2
Name: dogs, dtype: float64