Skip to content

Commit c8ef185

Browse files
topper-123Pingviinituutti
authored andcommitted
CLN: minor cleanups for MultiIndex.codes (pandas-dev#24146)
1 parent 7b174e5 commit c8ef185

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

doc/source/whatsnew/v0.24.0.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -1102,8 +1102,9 @@ Deprecations
11021102

11031103
- :attr:`MultiIndex.labels` has been deprecated and replaced by :attr:`MultiIndex.codes`.
11041104
The functionality is unchanged. The new name better reflects the natures of
1105-
these codes and makes the ``MultiIndex`` API more similar to the API for :class:`CategoricalIndex`(:issue:`13443`).
1105+
these codes and makes the ``MultiIndex`` API more similar to the API for :class:`CategoricalIndex` (:issue:`13443`).
11061106
As a consequence, other uses of the name ``labels`` in ``MultiIndex`` have also been deprecated and replaced with ``codes``:
1107+
11071108
- You should initialize a ``MultiIndex`` instance using a parameter named ``codes`` rather than ``labels``.
11081109
- ``MultiIndex.set_labels`` has been deprecated in favor of :meth:`MultiIndex.set_codes`.
11091110
- For method :meth:`MultiIndex.copy`, the ``labels`` parameter has been deprecated and replaced by a ``codes`` parameter.

pandas/core/indexes/frozen.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
These are used for:
55
66
- .names (FrozenList)
7-
- .levels & .labels (FrozenNDArray)
7+
- .levels & .codes (FrozenNDArray)
88
99
"""
1010

0 commit comments

Comments
 (0)