You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "JohnsonZhang (JIRA)" <ji...@apache.org> on 2018/10/30 07:20:01 UTC
[jira] [Created] (SPARK-25881) pyspark df.topandas() deal decimal
type as object
JohnsonZhang created SPARK-25881:
------------------------------------
Summary: 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
>>> 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