Details
-
New Feature
-
Status: Resolved
-
Minor
-
Resolution: Incomplete
-
None
-
None
Description
Would be nice to specify the dtypes of the pandas dataframe during the toPandas() call. Something like:
pdf = df.toPandas(dtypes={'a': 'float64', 'b': 'datetime64', 'c': 'bool', 'd': 'category'})
Since dtypes like `category` are more memory efficient, you could potentially load many more rows into a pandas dataframe with this option without running out of memory.
Attachments
Issue Links
- is related to
-
SPARK-13534 Implement Apache Arrow serializer for Spark DataFrame for use in DataFrame.toPandas
- Resolved