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 gh-12591, gh-12594
  • Loading branch information
gfyoung committed Jun 24, 2017
1 parent 1265c27 commit 4bfb2b7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 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
6 changes: 2 additions & 4 deletions pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@

from pandas.core.base import PandasObject, IndexOpsMixin
import pandas.core.base as base
from pandas.util._decorators import (Appender, Substitution, cache_readonly,
deprecate, deprecate_kwarg)
from pandas.util._decorators import (Appender, Substitution,
cache_readonly, deprecate_kwarg)
from pandas.core.indexes.frozen import FrozenList
import pandas.core.common as com
import pandas.core.dtypes.concat as _concat
Expand Down 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 4bfb2b7

Please sign in to comment.