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 2017/09/22 06:36:00 UTC
[jira] [Commented] (SPARK-21766) DataFrame toPandas() raises
ValueError with nullable int columns
[ https://issues.apache.org/jira/browse/SPARK-21766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16176000#comment-16176000 ]
Apache Spark commented on SPARK-21766:
--------------------------------------
User 'viirya' has created a pull request for this issue:
https://github.com/apache/spark/pull/19319
> DataFrame toPandas() raises ValueError with nullable int columns
> ----------------------------------------------------------------
>
> Key: SPARK-21766
> URL: https://issues.apache.org/jira/browse/SPARK-21766
> Project: Spark
> Issue Type: Bug
> Components: PySpark
> Affects Versions: 2.3.0
> Reporter: Bryan Cutler
>
> When calling {{DataFrame.toPandas()}} (without Arrow enabled), if there is a IntegerType column that has null values the following exception is thrown:
> {noformat}
> ValueError: Cannot convert non-finite values (NA or inf) to integer
> {noformat}
> This is because the null values first get converted to float NaN during the construction of the Pandas DataFrame in {{from_records}}, and then it is attempted to be converted back to to an integer where it fails.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org