You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2018/10/30 07:49:01 UTC
[jira] [Assigned] (SPARK-25881) pyspark df.topandas() deal decimal
type as object
[ https://issues.apache.org/jira/browse/SPARK-25881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-25881:
------------------------------------
Assignee: Apache Spark
> pyspark df.topandas() deal decimal type as object
> -------------------------------------------------
>
> Key: SPARK-25881
> URL: https://issues.apache.org/jira/browse/SPARK-25881
> Project: Spark
> Issue Type: Improvement
> Components: PySpark
> Affects Versions: 2.3.2
> Reporter: JohnsonZhang
> Assignee: Apache Spark
> Priority: Minor
>
> >>> for i in df_spark.dtypes:
> ... print(i)
> ...
> ('dt', 'string')
> ('cost_sum', 'decimal(38,3)')
> ('req_sum', 'bigint')
> ('pv_sum', 'bigint')
> ('click_sum', 'bigint')
> the 'cost_sum' column turn to object type when using toPandas()
> >>> df_pd.dtypes
> dt object
> cost_sum object
> req_sum int64
> pv_sum int64
> click_sum int64
> dtype: object
>
--
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