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
Copy file name to clipboardexpand all lines: doc/source/whatsnew/v0.24.0.rst
+7
Original file line number
Diff line number
Diff line change
@@ -1010,6 +1010,13 @@ Other API Changes
1010
1010
Deprecations
1011
1011
~~~~~~~~~~~~
1012
1012
1013
+
- Initializing a :class:`MultiIndex` using parameter ``labels`` has been deprecated.
1014
+
Initialize using parameter name ``codes`` instead. Likewise, other uses of
1015
+
the name ``labels`` has been deprecated in ``MultiIndex``:
1016
+
- :attr:`labels` has been deprecated in favor of :attr:`codes`
1017
+
- :meth:`set_labels` has been deprecated in favor of :meth:`set_codes`
1018
+
- for method :meth:`copy` the ``labels`` parameter has been deprecated. Use ``codes`` instead.
1019
+
This change better reflects the use of the codes and makes the API more similar to the API for :class:`CategoricalIndex`(:issue:`13443`)
1013
1020
- :meth:`DataFrame.to_stata`, :meth:`read_stata`, :class:`StataReader` and :class:`StataWriter` have deprecated the ``encoding`` argument. The encoding of a Stata dta file is determined by the file type and cannot be changed (:issue:`21244`)
1014
1021
- :meth:`MultiIndex.to_hierarchical` is deprecated and will be removed in a future version (:issue:`21613`)
1015
1022
- :meth:`Series.ptp` is deprecated. Use ``numpy.ptp`` instead (:issue:`21614`)
0 commit comments