You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, selecting at least 1 valid label with a list-like indexer would always succeed, returning ``NaN`` for missing labels.
276
+
Previously, selecting with a list of labels, where one or more labels were missing would always succeed, returning ``NaN`` for missing labels.
277
277
This will now show a ``FutureWarning``, in the future this will raise a ``KeyError`` (:issue:`15747`).
278
278
This warning will trigger on a ``DataFrame`` or a ``Series`` for using ``.loc[]`` or ``[[]]`` when passing a list-of-labels with at least 1 missing label.
279
279
See the :ref:`deprecation docs <indexing.deprecate_loc_reindex_listlike>`.
@@ -288,7 +288,6 @@ Previous Behavior
288
288
289
289
.. code-block:: ipython
290
290
291
-
292
291
In [4]: s.loc[[1, 2, 3]]
293
292
Out[4]:
294
293
1 2.0
@@ -299,6 +298,8 @@ Previous Behavior
299
298
300
299
Current Behavior
301
300
301
+
.. code-block:: ipython
302
+
302
303
In [4]: s.loc[[1, 2, 3]]
303
304
Passing list-likes to .loc or [] with any missing label will raise
304
305
KeyError in the future, you can use .reindex() as an alternative.
@@ -628,6 +629,7 @@ Deprecations
628
629
- :func:`SeriesGroupBy.nth` has deprecated ``True`` in favor of ``'all'`` for its kwarg ``dropna`` (:issue:`11038`).
629
630
- :func:`DataFrame.as_blocks` is deprecated, as this is exposing the internal implementation (:issue:`17302`)
630
631
- ``pd.TimeGrouper`` is deprecated in favor of :class:`pandas.Grouper` (:issue:`16747`)
632
+
- Passing a non-existant column in ``.to_excel(..., columns=)`` is deprecated and will raise a ``KeyError`` in the future (:issue:`17295`)
0 commit comments