Skip to content

Commit

Permalink
remove unused dtype from MultiIndex constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed Feb 19, 2025
1 parent 19ea997 commit 22831be
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions doc/source/whatsnew/v3.0.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ Other API changes
- Made ``dtype`` a required argument in :meth:`ExtensionArray._from_sequence_of_strings` (:issue:`56519`)
- Passing a :class:`Series` input to :func:`json_normalize` will now retain the :class:`Series` :class:`Index`, previously output had a new :class:`RangeIndex` (:issue:`51452`)
- Removed :meth:`Index.sort` which always raised a ``TypeError``. This attribute is not defined and will raise an ``AttributeError`` (:issue:`59283`)
- Unused ``dtype`` argument has been removed from the :class:`MultiIndex` constructor (:issue:`60962`)
- Updated :meth:`DataFrame.to_excel` so that the output spreadsheet has no styling. Custom styling can still be done using :meth:`Styler.to_excel` (:issue:`54154`)
- pickle and HDF (``.h5``) files created with Python 2 are no longer explicitly supported (:issue:`57387`)
- pickled objects from pandas version less than ``1.0.0`` are no longer supported (:issue:`57155`)
Expand Down
1 change: 0 additions & 1 deletion pandas/core/indexes/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ def __new__(
codes=None,
sortorder=None,
names=None,
dtype=None,
copy: bool = False,
name=None,
verify_integrity: bool = True,
Expand Down
4 changes: 2 additions & 2 deletions pandas/tests/indexing/multiindex/test_loc.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def test_loc_getitem_series(self):
empty = Series(data=[], dtype=np.float64)
expected = Series(
[],
index=MultiIndex(levels=index.levels, codes=[[], []], dtype=np.float64),
index=MultiIndex(levels=index.levels, codes=[[], []]),
dtype=np.float64,
)
result = x.loc[empty]
Expand All @@ -129,7 +129,7 @@ def test_loc_getitem_array(self):
empty = np.array([])
expected = Series(
[],
index=MultiIndex(levels=index.levels, codes=[[], []], dtype=np.float64),
index=MultiIndex(levels=index.levels, codes=[[], []]),
dtype="float64",
)
result = x.loc[empty]
Expand Down

0 comments on commit 22831be

Please sign in to comment.