Skip to content

Commit 3c0215d

Browse files
authored
CLN: MultiIndex.drop_duplicates (#48592)
* CLN: MultiIndex.drop_duplicates * adjust test
1 parent 1ac2675 commit 3c0215d

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

pandas/core/indexes/multi.py

-4
Original file line numberDiff line numberDiff line change
@@ -3888,10 +3888,6 @@ def set_names( # type: ignore[override]
38883888
# base class "Index" defined the type as "Callable[[Index, Any, bool], Any]")
38893889
rename = set_names # type: ignore[assignment]
38903890

3891-
@deprecate_nonkeyword_arguments(version=None, allowed_args=["self"])
3892-
def drop_duplicates(self, keep: str | bool = "first") -> MultiIndex:
3893-
return super().drop_duplicates(keep=keep)
3894-
38953891
# ---------------------------------------------------------------
38963892
# Arithmetic/Numeric Methods - Disabled
38973893

pandas/tests/indexes/multi/test_duplicates.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def test_multi_drop_duplicates_pos_args_deprecation():
332332
idx = MultiIndex.from_arrays([[1, 2, 3, 1], [1, 2, 3, 1]])
333333
msg = (
334334
"In a future version of pandas all arguments of "
335-
"MultiIndex.drop_duplicates will be keyword-only"
335+
"Index.drop_duplicates will be keyword-only"
336336
)
337337
with tm.assert_produces_warning(FutureWarning, match=msg):
338338
result = idx.drop_duplicates("last")

0 commit comments

Comments
 (0)