Skip to content

Commit 656950d

Browse files
committed
list examples of operations
1 parent 56d77cd commit 656950d

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

doc/source/whatsnew/v2.1.0.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,20 @@ Deprecated silent upcasting in setitem-like Series operations
302302
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
303303

304304
Setitem-like operations on Series (or DataFrame columns) which silently upcast the dtype are
305-
deprecated and show a warning.
305+
deprecated and show a warning. Examples of affected operations are:
306+
307+
- ``ser.fillna('foo', inplace=True)``
308+
- ``ser.where(ser.isna(), 'foo', inplace=True)``
309+
- ``ser.iloc[indexer] = 'foo'``
310+
- ``ser.loc[indexer] = 'foo'``
311+
- ``df.iloc[indexer, 0] = 'foo'``
312+
- ``df.loc[indexer, 'a'] = 'foo'``
313+
- ``ser[indexer] = 'foo'``
314+
315+
where ``ser`` is a :class:`Series`, ``df`` is a :class:`DataFrame`, and ``indexer``
316+
could be a slice, a mask, a single value, a list or array of values, or any other
317+
allowed indexer.
318+
306319
In a future version, these will raise an error and you should cast to a common dtype first.
307320

308321
*Previous behavior*:

0 commit comments

Comments
 (0)