Skip to content

Commit

Permalink
Revert "[SPARK-21658][SQL][PYSPARK] Add default None for value in na.…
Browse files Browse the repository at this point in the history
…replace in PySpark"

This reverts commit 0fcde87.
  • Loading branch information
HyukjinKwon committed Feb 3, 2018
1 parent 522e0b1 commit 8a93164
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions python/pyspark/sql/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -1577,16 +1577,6 @@ def replace(self, to_replace, value=None, subset=None):
|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|
Expand Down Expand Up @@ -2055,7 +2045,7 @@ def fill(self, value, subset=None):

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__
Expand Down

0 comments on commit 8a93164

Please sign in to comment.