GitHub user byakuinss opened a pull request:

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

    ## What changes were proposed in this pull request?
    JIRA issue:
    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)
    >>>{"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 SPARK-21658

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

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 <>
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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to