Skip to content

Commit 0d8a0f3

Browse files
authored
DOC: Move deprecation note (#56593)
1 parent 69ee05f commit 0d8a0f3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

doc/source/whatsnew/v2.2.0.rst

+5-1
Original file line numberDiff line numberDiff line change
@@ -571,13 +571,18 @@ These methods are:
571571
- :meth:`DataFrame.fillna`, :meth:`Series.fillna`
572572
- :meth:`DataFrame.ffill`, :meth:`Series.ffill`
573573
- :meth:`DataFrame.bfill`, :meth:`Series.bfill`
574+
- :meth:`DataFrame.mask`, :meth:`Series.mask`
575+
- :meth:`DataFrame.where`, :meth:`Series.where`
576+
- :meth:`DataFrame.clip`, :meth:`Series.clip`
574577

575578
Explicitly call :meth:`DataFrame.infer_objects` to replicate the current behavior in the future.
576579

577580
.. code-block:: ipython
578581
579582
result = result.infer_objects(copy=False)
580583
584+
Or explicitly cast all-round floats to ints using ``astype``.
585+
581586
Set the following option to opt into the future behavior:
582587

583588
.. code-block:: ipython
@@ -618,7 +623,6 @@ Other Deprecations
618623
- Deprecated allowing passing :class:`BlockManager` objects to :class:`DataFrame` or :class:`SingleBlockManager` objects to :class:`Series` (:issue:`52419`)
619624
- Deprecated behavior of :meth:`Index.insert` with an object-dtype index silently performing type inference on the result, explicitly call ``result.infer_objects(copy=False)`` for the old behavior instead (:issue:`51363`)
620625
- Deprecated casting non-datetimelike values (mainly strings) in :meth:`Series.isin` and :meth:`Index.isin` with ``datetime64``, ``timedelta64``, and :class:`PeriodDtype` dtypes (:issue:`53111`)
621-
- Deprecated downcasting behavior in :meth:`Series.where`, :meth:`DataFrame.where`, :meth:`Series.mask`, :meth:`DataFrame.mask`, :meth:`Series.clip`, :meth:`DataFrame.clip`; in a future version these will not infer object-dtype columns to non-object dtype, or all-round floats to integer dtype. Call ``result.infer_objects(copy=False)`` on the result for object inference, or explicitly cast floats to ints. To opt in to the future version, use ``pd.set_option("future.no_silent_downcasting", True)`` (:issue:`53656`)
622626
- Deprecated dtype inference in :class:`Index`, :class:`Series` and :class:`DataFrame` constructors when giving a pandas input, call ``.infer_objects`` on the input to keep the current behavior (:issue:`56012`)
623627
- Deprecated dtype inference when setting a :class:`Index` into a :class:`DataFrame`, cast explicitly instead (:issue:`56102`)
624628
- Deprecated including the groups in computations when using :meth:`.DataFrameGroupBy.apply` and :meth:`.DataFrameGroupBy.resample`; pass ``include_groups=False`` to exclude the groups (:issue:`7155`)

0 commit comments

Comments
 (0)