@@ -10858,25 +10858,28 @@ def where(
10858
10858
10859
10859
Returns
10860
10860
-------
10861
- Same type as caller or None if ``inplace=True``.
10861
+ Series or DataFrame unless ``inplace=True`` in which case
10862
+ returns None.
10862
10863
10863
10864
See Also
10864
10865
--------
10865
10866
:func:`DataFrame.{name_other}` : Return an object of same shape as
10866
- self.
10867
+ caller.
10868
+ :func:`Series.{name_other}` : Return an object of same shape as
10869
+ caller.
10867
10870
10868
10871
Notes
10869
10872
-----
10870
10873
The {name} method is an application of the if-then idiom. For each
10871
- element in the calling DataFrame , if ``cond`` is ``{cond}`` the
10872
- element is used; otherwise the corresponding element from the DataFrame
10874
+ element in the caller , if ``cond`` is ``{cond}`` the
10875
+ element is used; otherwise the corresponding element from
10873
10876
``other`` is used. If the axis of ``other`` does not align with axis of
10874
10877
``cond`` {klass}, the values of ``cond`` on misaligned index positions
10875
10878
will be filled with {cond_rev}.
10876
10879
10877
- The signature for :func:`DataFrame .where` differs from
10878
- :func:`numpy .where`. Roughly ``df1 .where(m, df2)`` is equivalent to
10879
- ``np.where(m, df1, df2)``.
10880
+ The signature for :func:`Series .where` or
10881
+ :func:`DataFrame .where` differs from :func:`numpy .where`.
10882
+ Roughly ``df1.where(m, df2)`` is equivalent to ``np.where(m, df1, df2)``.
10880
10883
10881
10884
For further details and examples see the ``{name}`` documentation in
10882
10885
:ref:`indexing <indexing.where_mask>`.
0 commit comments