[ https://issues.apache.org/jira/browse/SPARK-25881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16668442#comment-16668442 ]
Apache Spark commented on SPARK-25881: -------------------------------------- User '351zyf' has created a pull request for this issue: https://github.com/apache/spark/pull/22891 > 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 > 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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org