Skip to content

Commit 24fda6f

Browse files
committed
DOC: fix mask/where docstring alignment note (#61781)
The explanatory paragraph wrongly said that alignment is between `other` and `cond`. It is between *self* and `cond`; values fall back to *self* for mis-aligned positions. Update both generic docstring templates so all Series/DataFrame variants inherit the correct wording. Closes #61781 Signed-off-by: Abhay Singh <[email protected]>
1 parent 364ca58 commit 24fda6f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/core/generic.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9946,9 +9946,9 @@ def where(
99469946
The {name} method is an application of the if-then idiom. For each
99479947
element in the caller, if ``cond`` is ``{cond}`` the
99489948
element is used; otherwise the corresponding element from
9949-
``other`` is used. If the axis of ``other`` does not align with axis of
9950-
``cond`` {klass}, the values of ``cond`` on misaligned index positions
9951-
will be filled with {cond_rev}.
9949+
``other`` is used. If the axis of ``self`` does not align with axis of
9950+
``cond``, misaligned index positions will be filled with the original value
9951+
from ``self``.
99529952
99539953
The signature for :func:`Series.where` or
99549954
:func:`DataFrame.where` differs from :func:`numpy.where`.

0 commit comments

Comments
 (0)