File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 33
33
Timestamp ,
34
34
to_offset ,
35
35
)
36
+
36
37
from pandas ._typing import (
37
38
AlignJoin ,
38
39
AnyArrayLike ,
67
68
Renamer ,
68
69
Scalar ,
69
70
Self ,
70
- SequenceNotStr ,
71
+
72
+ SequenceNotStr ,
71
73
SortKind ,
72
74
StorageOptions ,
73
75
Suffixes ,
@@ -9946,7 +9948,7 @@ def where(
9946
9948
The {name} method is an application of the if-then idiom. For each
9947
9949
element in the caller, if ``cond`` is ``{cond}`` the
9948
9950
element is used; otherwise the corresponding element from
9949
- ``other`` is used. If the axis of ``other`` does not align with axis of
9951
+ ``other`` is used. If the axis of ``other`` does not align with axis of
9950
9952
``cond`` {klass}, the values of ``cond`` on misaligned index positions
9951
9953
will be filled with {cond_rev}.
9952
9954
@@ -9982,6 +9984,7 @@ def where(
9982
9984
>>> t = pd.Series([True, False])
9983
9985
>>> s.where(t, 99)
9984
9986
0 0
9987
+
9985
9988
1 99
9986
9989
2 99
9987
9990
3 99
@@ -10017,7 +10020,8 @@ def where(
10017
10020
1 2 3
10018
10021
2 4 5
10019
10022
3 6 7
10020
- 4 8 9
10023
+ 4
10024
+ 8 9
10021
10025
>>> m = df % 3 == 0
10022
10026
>>> df.where(m, -df)
10023
10027
A B
You can’t perform that action at this time.
0 commit comments