You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2019/05/21 04:04:17 UTC

[jira] [Updated] (SPARK-14141) Let user specify datatypes of pandas dataframe in toPandas()

     [ https://issues.apache.org/jira/browse/SPARK-14141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hyukjin Kwon updated SPARK-14141:
---------------------------------
    Labels: bulk-closed  (was: )

> Let user specify datatypes of pandas dataframe in toPandas()
> ------------------------------------------------------------
>
>                 Key: SPARK-14141
>                 URL: https://issues.apache.org/jira/browse/SPARK-14141
>             Project: Spark
>          Issue Type: New Feature
>          Components: Input/Output, PySpark, SQL
>            Reporter: Luke Miner
>            Priority: Minor
>              Labels: bulk-closed
>
> Would be nice to specify the dtypes of the pandas dataframe during the toPandas() call. Something like:
> bq. 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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org