GitHub user byakuinss opened a pull request:

    https://github.com/apache/spark/pull/18895

    [SPARK-21658][SQL][PYSPARK] Add default None for value in na.replace in 
PySpark

    ## What changes were proposed in this pull request?
    JIRA issue: https://issues.apache.org/jira/browse/SPARK-21658
    
    Add default None for value in `na.replace` since `Dataframe.replace` and 
`DataframeNaFunctions.replace` are alias. 
    
    The default values are the same now. 
    ```
    >>> df = sqlContext.createDataFrame([('Alice', 10, 80.0)])
    >>> df.replace({"Alice": "a"}).first()
    Row(_1=u'a', _2=10, _3=80.0)
    >>> df.na.replace({"Alice": "a"}).first()
    Row(_1=u'a', _2=10, _3=80.0)
    ```
    
    ## How was this patch tested?
    Existing tests.
    
    cc @viirya 


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/byakuinss/spark SPARK-21658

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/18895.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #18895
    
----
commit 8af1e15f37c750dda53542b5a854f832ff006773
Author: byakuinss <grace.chinha...@gmail.com>
Date:   2017-08-09T16:39:07Z

    [SPARK-21658][SQL][PYSPARK] Add default None for value in na.replace

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to