Skip to content

Commit edc9ff4

Browse files
committed
2 parents 330eda8 + 8afd6a1 commit edc9ff4

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

pandas/core/generic.py

+1-19
Original file line numberDiff line numberDiff line change
@@ -9614,8 +9614,7 @@ def where(
96149614
The {name} method is an application of the if-then idiom. For each
96159615
element in the calling DataFrame, if ``cond`` is ``{cond}`` the
96169616
element is used; otherwise the corresponding element from the DataFrame
9617-
``other`` is used. If `cond` {klass} is less in size than `other`, the
9618-
default bool for the missing value is {cond_rev}.
9617+
``other`` is used.
96199618
96209619
The signature for :func:`DataFrame.where` differs from
96219620
:func:`numpy.where`. Roughly ``df1.where(m, df2)`` is equivalent to
@@ -9642,23 +9641,6 @@ def where(
96429641
4 NaN
96439642
dtype: float64
96449643
9645-
>>> s = pd.Series(range(5))
9646-
>>> t = pd.Series([True, False])
9647-
>>> s.where(t,99)
9648-
0 0
9649-
1 99
9650-
2 99
9651-
3 99
9652-
4 99
9653-
dtype: int64
9654-
>>> s.mask(t, 99)
9655-
0 99
9656-
1 1
9657-
2 99
9658-
3 99
9659-
4 99
9660-
dtype: int64
9661-
96629644
>>> s.where(s > 1, 10)
96639645
0 10
96649646
1 10

0 commit comments

Comments
 (0)