Skip to content

Commit a09d3e9

Browse files
committed
Add bool to comment and Error text
1 parent 351be99 commit a09d3e9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python/pyspark/sql/dataframe.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,8 +1373,8 @@ def replace(self, to_replace, value=None, subset=None):
13731373
Value to be replaced.
13741374
If the value is a dict, then `value` is ignored and `to_replace` must be a
13751375
mapping between a value and a replacement.
1376-
:param value: int, long, float, string, list or None.
1377-
The replacement value must be an int, long, float, string or None. If `value` is a
1376+
:param value: bool, int, long, float, string, list or None.
1377+
The replacement value must be a bool, int, long, float, string or None. If `value` is a
13781378
list, `value` should be of the same length and type as `to_replace`.
13791379
If `value` is a scalar and `to_replace` is a sequence, then `value` is
13801380
used as a replacement for each item in `to_replace`.
@@ -1435,13 +1435,13 @@ def all_of_(xs):
14351435
valid_types = (bool, float, int, long, basestring, list, tuple)
14361436
if not isinstance(to_replace, valid_types + (dict, )):
14371437
raise ValueError(
1438-
"to_replace should be a float, int, long, string, list, tuple, or dict. "
1438+
"to_replace should be a bool, float, int, long, string, list, tuple, or dict. "
14391439
"Got {0}".format(type(to_replace)))
14401440

14411441
if not isinstance(value, valid_types) and value is not None \
14421442
and not isinstance(to_replace, dict):
14431443
raise ValueError("If to_replace is not a dict, value should be "
1444-
"a float, int, long, string, list, tuple or None. "
1444+
"a bool, float, int, long, string, list, tuple or None. "
14451445
"Got {0}".format(type(value)))
14461446

14471447
if isinstance(to_replace, (list, tuple)) and isinstance(value, (list, tuple)):

0 commit comments

Comments
 (0)