pyspark.pandas.DataFrame.to_pandas#
- DataFrame.to_pandas()[source]#
Return a pandas DataFrame.
Note
This method should only be used if the resulting pandas DataFrame 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.to_pandas() dogs cats 0 0.2 0.3 1 0.0 0.6 2 0.6 0.0 3 0.2 0.1