You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by li...@apache.org on 2018/02/03 18:40:24 UTC
spark git commit: [SPARK-21658][SQL][PYSPARK] Revert "[] Add default
None for value in na.replace in PySpark"
Repository: spark
Updated Branches:
refs/heads/master 4aaa7d40b -> 551dff2bc
[SPARK-21658][SQL][PYSPARK] Revert "[] Add default None for value in na.replace in PySpark"
This reverts commit 0fcde87aadc9a92e138f11583119465ca4b5c518.
See the discussion in [SPARK-21658](https://issues.apache.org/jira/browse/SPARK-21658), [SPARK-19454](https://issues.apache.org/jira/browse/SPARK-19454) and https://github.com/apache/spark/pull/16793
Author: hyukjinkwon <gu...@gmail.com>
Closes #20496 from HyukjinKwon/revert-SPARK-21658.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/551dff2b
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/551dff2b
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/551dff2b
Branch: refs/heads/master
Commit: 551dff2bccb65e9b3f77b986f167aec90d9a6016
Parents: 4aaa7d4
Author: hyukjinkwon <gu...@gmail.com>
Authored: Sat Feb 3 10:40:21 2018 -0800
Committer: gatorsmile <ga...@gmail.com>
Committed: Sat Feb 3 10:40:21 2018 -0800
----------------------------------------------------------------------
python/pyspark/sql/dataframe.py | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/551dff2b/python/pyspark/sql/dataframe.py
----------------------------------------------------------------------
diff --git a/python/pyspark/sql/dataframe.py b/python/pyspark/sql/dataframe.py
index 1496cba..2e55407 100644
--- a/python/pyspark/sql/dataframe.py
+++ b/python/pyspark/sql/dataframe.py
@@ -1577,16 +1577,6 @@ class DataFrame(object):
|null| null|null|
+----+------+----+
- >>> df4.na.replace('Alice').show()
- +----+------+----+
- | age|height|name|
- +----+------+----+
- | 10| 80|null|
- | 5| null| Bob|
- |null| null| Tom|
- |null| null|null|
- +----+------+----+
-
>>> df4.na.replace(['Alice', 'Bob'], ['A', 'B'], 'name').show()
+----+------+----+
| age|height|name|
@@ -2055,7 +2045,7 @@ class DataFrameNaFunctions(object):
fill.__doc__ = DataFrame.fillna.__doc__
- def replace(self, to_replace, value=None, subset=None):
+ def replace(self, to_replace, value, subset=None):
return self.df.replace(to_replace, value, subset)
replace.__doc__ = DataFrame.replace.__doc__
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org