File tree 1 file changed +1
-19
lines changed
1 file changed +1
-19
lines changed Original file line number Diff line number Diff line change @@ -9614,8 +9614,7 @@ def where(
9614
9614
The {name} method is an application of the if-then idiom. For each
9615
9615
element in the calling DataFrame, if ``cond`` is ``{cond}`` the
9616
9616
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.
9619
9618
9620
9619
The signature for :func:`DataFrame.where` differs from
9621
9620
:func:`numpy.where`. Roughly ``df1.where(m, df2)`` is equivalent to
@@ -9642,23 +9641,6 @@ def where(
9642
9641
4 NaN
9643
9642
dtype: float64
9644
9643
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
-
9662
9644
>>> s.where(s > 1, 10)
9663
9645
0 10
9664
9646
1 10
You can’t perform that action at this time.
0 commit comments