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.txt
+27-1
Original file line number
Diff line number
Diff line change
@@ -180,6 +180,29 @@ array, but rather an ``ExtensionArray``:
180
180
This is the same behavior as ``Series.values`` for categorical data. See
181
181
:ref:`whatsnew_0240.api_breaking.interval_values` for more.
182
182
183
+
.. _whatsnew_0240.enhancements.rename_axis:
184
+
185
+
Renaming names in a MultiIndex
186
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
187
+
188
+
:func:`DataFrame.rename_axis` now supports ``index`` and ``columns`` arguments
189
+
and :func:`Series.rename_axis` supports ``index`` argument (:issue:`19978`)
190
+
191
+
This change allows a dictionary to be passed so that some of the names
192
+
of a ``MultiIndex`` can be changed.
193
+
194
+
Example:
195
+
196
+
.. ipython:: python
197
+
198
+
mi = pd.MultiIndex.from_product([list('AB'), list('CD'), list('EF')],
199
+
names=['AB', 'CD', 'EF'])
200
+
df = pd.DataFrame([i for i in range(len(mi))], index=mi, columns=['N'])
201
+
df
202
+
df.rename_axis(index={'CD': 'New'})
203
+
204
+
See the :ref:`advanced docs on renaming<advanced.index_names>` for more details.
205
+
183
206
.. _whatsnew_0240.enhancements.other:
184
207
185
208
Other Enhancements
@@ -930,6 +953,7 @@ Deprecations
930
953
- :func:`DatetimeIndex.shift` and :func:`PeriodIndex.shift` now accept ``periods`` argument instead of ``n`` for consistency with :func:`Index.shift` and :func:`Series.shift`. Using ``n`` throws a deprecation warning (:issue:`22458`, :issue:`22912`)
931
954
- The ``fastpath`` keyword of the different Index constructors is deprecated (:issue:`23110`).
932
955
- :meth:`Timestamp.tz_localize`, :meth:`DatetimeIndex.tz_localize`, and :meth:`Series.tz_localize` have deprecated the ``errors`` argument in favor of the ``nonexistent`` argument (:issue:`8917`)
956
+
- The class ``FrozenNDArray`` has been deprecated. When unpickling, ``FrozenNDArray`` will be unpickled to ``np.ndarray`` once this class is removed (:issue:`9031`)
933
957
934
958
.. _whatsnew_0240.prior_deprecations:
935
959
@@ -942,7 +966,7 @@ Removal of prior version deprecations/changes
942
966
- Removal of the previously deprecated module ``pandas.core.datetools`` (:issue:`14105`, :issue:`14094`)
943
967
- Strings passed into :meth:`DataFrame.groupby` that refer to both column and index levels will raise a ``ValueError`` (:issue:`14432`)
944
968
- :meth:`Index.repeat` and :meth:`MultiIndex.repeat` have renamed the ``n`` argument to ``repeats`` (:issue:`14645`)
945
-
- The ``Series`` constructor and ``.astype`` method will now raise a ``ValueError`` if timestamp dtypes are passed in without a frequency (e.g. ``np.datetime64``) for the ``dtype`` parameter (:issue:`15987`)
969
+
- The ``Series`` constructor and ``.astype`` method will now raise a ``ValueError`` if timestamp dtypes are passed in without a unit (e.g. ``np.datetime64``) for the ``dtype`` parameter (:issue:`15987`)
946
970
- Removal of the previously deprecated ``as_indexer`` keyword completely from ``str.match()`` (:issue:`22356`, :issue:`6581`)
947
971
- The modules ``pandas.types``, ``pandas.computation``, and ``pandas.util.decorators`` have been removed (:issue:`16157`, :issue:`16250`)
948
972
- Removed the ``pandas.formats.style`` shim for :class:`pandas.io.formats.style.Styler` (:issue:`16059`)
@@ -1030,6 +1054,7 @@ Datetimelike
1030
1054
- Bug in :func:`to_datetime` with an :class:`Index` argument that would drop the ``name`` from the result (:issue:`21697`)
1031
1055
- Bug in :class:`PeriodIndex` where adding or subtracting a :class:`timedelta` or :class:`Tick` object produced incorrect results (:issue:`22988`)
1032
1056
- Bug in :func:`date_range` when decrementing a start date to a past end date by a negative frequency (:issue:`23270`)
1057
+
- Bug in :meth:`Series.min` which would return ``NaN`` instead of ``NaT`` when called on a series of ``NaT`` (:issue:`23282`)
1033
1058
- Bug in :func:`DataFrame.combine` with datetimelike values raising a TypeError (:issue:`23079`)
1034
1059
- Bug in :func:`date_range` with frequency of ``Day`` or higher where dates sufficiently far in the future could wrap around to the past instead of raising ``OutOfBoundsDatetime`` (:issue:`14187`)
1035
1060
- Bug in :class:`PeriodIndex` with attribute ``freq.n`` greater than 1 where adding a :class:`DateOffset` object would return incorrect results (:issue:`23215`)
@@ -1108,6 +1133,7 @@ Interval
1108
1133
- Bug in the ``IntervalIndex`` repr where a trailing comma was missing after the list of intervals (:issue:`20611`)
1109
1134
- Bug in :class:`Interval` where scalar arithmetic operations did not retain the ``closed`` value (:issue:`22313`)
1110
1135
- Bug in :class:`IntervalIndex` where indexing with datetime-like values raised a ``KeyError`` (:issue:`20636`)
1136
+
- Bug in ``IntervalTree`` where data containing ``NaN`` triggered a warning and resulted in incorrect indexing queries with :class:`IntervalIndex` (:issue:`23352`)
0 commit comments