Skip to content

Commit

Permalink
MAINT: Drop Index.sym_diff
Browse files Browse the repository at this point in the history
Deprecated in 0.18.1

xref pandas-devgh-12591, pandas-devgh-12594
  • Loading branch information
gfyoung committed Jun 23, 2017
1 parent 18f7b1c commit 27361ec
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
1 change: 1 addition & 0 deletions doc/source/whatsnew/v0.21.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Removal of prior version deprecations/changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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


Expand Down
2 changes: 0 additions & 2 deletions pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2376,8 +2376,6 @@ def symmetric_difference(self, other, result_name=None):
attribs['freq'] = None
return self._shallow_copy_with_infer(the_diff, **attribs)

sym_diff = deprecate('sym_diff', symmetric_difference)

def _get_unique_index(self, dropna=False):
"""
Returns an index containing unique values.
Expand Down
6 changes: 1 addition & 5 deletions pandas/tests/indexes/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,11 +656,7 @@ def test_symmetric_difference(self):
if isinstance(idx, MultiIndex):
msg = "other must be a MultiIndex or a list of tuples"
with tm.assert_raises_regex(TypeError, msg):
result = first.symmetric_difference([1, 2, 3])

# 12591 deprecated
with tm.assert_produces_warning(FutureWarning):
first.sym_diff(second)
first.symmetric_difference([1, 2, 3])

def test_insert_base(self):

Expand Down

0 comments on commit 27361ec

Please sign in to comment.