Skip to content

Commit

Permalink
CLN: minor cleanups for MultiIndex.codes (pandas-dev#24146)
Browse files Browse the repository at this point in the history
  • Loading branch information
topper-123 authored and Pingviinituutti committed Feb 28, 2019
1 parent 7b174e5 commit c8ef185
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion doc/source/whatsnew/v0.24.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/indexes/frozen.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
These are used for:
- .names (FrozenList)
- .levels & .labels (FrozenNDArray)
- .levels & .codes (FrozenNDArray)
"""

Expand Down

0 comments on commit c8ef185

Please sign in to comment.