From 185b780001acc3bbae20f9f522edebe719a442e0 Mon Sep 17 00:00:00 2001 From: tp Date: Fri, 7 Dec 2018 18:25:46 +0000 Subject: [PATCH] minor cleanups --- doc/source/whatsnew/v0.24.0.rst | 3 ++- pandas/core/indexes/frozen.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/source/whatsnew/v0.24.0.rst b/doc/source/whatsnew/v0.24.0.rst index 53ae3200d2adb..aa8fbbd9b8dd8 100644 --- a/doc/source/whatsnew/v0.24.0.rst +++ b/doc/source/whatsnew/v0.24.0.rst @@ -1102,8 +1102,9 @@ Deprecations - :attr:`MultiIndex.labels` has been deprecated and replaced by :attr:`MultiIndex.codes`. The functionality is unchanged. The new name better reflects the natures of - these codes and makes the ``MultiIndex`` API more similar to the API for :class:`CategoricalIndex`(:issue:`13443`). + these codes and makes the ``MultiIndex`` API more similar to the API for :class:`CategoricalIndex` (:issue:`13443`). As a consequence, other uses of the name ``labels`` in ``MultiIndex`` have also been deprecated and replaced with ``codes``: + - You should initialize a ``MultiIndex`` instance using a parameter named ``codes`` rather than ``labels``. - ``MultiIndex.set_labels`` has been deprecated in favor of :meth:`MultiIndex.set_codes`. - For method :meth:`MultiIndex.copy`, the ``labels`` parameter has been deprecated and replaced by a ``codes`` parameter. diff --git a/pandas/core/indexes/frozen.py b/pandas/core/indexes/frozen.py index 46731069d88b8..982645ebd5124 100644 --- a/pandas/core/indexes/frozen.py +++ b/pandas/core/indexes/frozen.py @@ -4,7 +4,7 @@ These are used for: - .names (FrozenList) -- .levels & .labels (FrozenNDArray) +- .levels & .codes (FrozenNDArray) """