You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Nicholas Chammas (JIRA)" <ji...@apache.org> on 2016/04/27 02:35:12 UTC

[jira] [Commented] (SPARK-14932) Allow DataFrame.replace() to replace values with None

    [ https://issues.apache.org/jira/browse/SPARK-14932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15259266#comment-15259266 ] 

Nicholas Chammas commented on SPARK-14932:
------------------------------------------

[~marmbrus] - Not sure if you're a good person to ask about this, but does this request seem reasonable from an API standpoint?

> Allow DataFrame.replace() to replace values with None
> -----------------------------------------------------
>
>                 Key: SPARK-14932
>                 URL: https://issues.apache.org/jira/browse/SPARK-14932
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Nicholas Chammas
>            Priority: Minor
>
> Current doc: http://spark.apache.org/docs/1.6.1/api/python/pyspark.sql.html#pyspark.sql.DataFrame.replace
> I would like to specify {{None}} as the value to substitute in. This is currently [disallowed|https://github.com/apache/spark/blob/9797cc20c0b8fb34659df11af8eccb9ed293c52c/python/pyspark/sql/dataframe.py#L1144-L1145]. My use case is for replacing bad values with {{None}} so I can then ignore them with {{dropna()}}.
> For example, I have a dataset that incorrectly includes empty strings where there should be {{None}} values. I would like to replace the empty strings with {{None}} and then drop all null data with {{dropna()}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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