Skip to content

Commit 3ad5f3e

Browse files
committed
MAINT: Drop Index.sym_diff
Deprecated in 0.18.1 xref gh-12591, gh-12594
1 parent 18f7b1c commit 3ad5f3e

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

doc/source/whatsnew/v0.21.0.txt

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Removal of prior version deprecations/changes
7575
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7676

7777
- :func:`read_excel()` has dropped the ``has_index_names`` parameter (:issue:`10967`)
78+
- ``Index`` has dropped the ``.sym_diff()`` method in favor of ``.symmetric_difference()`` (:issue:`12591`)
7879
- ``Categorical`` has dropped the ``.order()`` and ``.sort()`` methods in favor of ``.sort_values()`` (:issue:`12882`)
7980

8081

pandas/core/indexes/base.py

-2
Original file line numberDiff line numberDiff line change
@@ -2376,8 +2376,6 @@ def symmetric_difference(self, other, result_name=None):
23762376
attribs['freq'] = None
23772377
return self._shallow_copy_with_infer(the_diff, **attribs)
23782378

2379-
sym_diff = deprecate('sym_diff', symmetric_difference)
2380-
23812379
def _get_unique_index(self, dropna=False):
23822380
"""
23832381
Returns an index containing unique values.

pandas/tests/indexes/common.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -656,11 +656,7 @@ def test_symmetric_difference(self):
656656
if isinstance(idx, MultiIndex):
657657
msg = "other must be a MultiIndex or a list of tuples"
658658
with tm.assert_raises_regex(TypeError, msg):
659-
result = first.symmetric_difference([1, 2, 3])
660-
661-
# 12591 deprecated
662-
with tm.assert_produces_warning(FutureWarning):
663-
first.sym_diff(second)
659+
first.symmetric_difference([1, 2, 3])
664660

665661
def test_insert_base(self):
666662

0 commit comments

Comments
 (0)