From 8fd14301f4d2a40f98c6dbaf7f4810e94253557c Mon Sep 17 00:00:00 2001 From: jbrockmendel Date: Fri, 22 Nov 2019 16:10:26 -0800 Subject: [PATCH] DEPR: remove Index.summary --- doc/source/whatsnew/v1.0.0.rst | 1 + pandas/core/indexes/base.py | 13 ------------- pandas/tests/indexes/test_base.py | 7 ------- 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/doc/source/whatsnew/v1.0.0.rst b/doc/source/whatsnew/v1.0.0.rst index 2b68ddf3d8918..bd48a9f504e99 100644 --- a/doc/source/whatsnew/v1.0.0.rst +++ b/doc/source/whatsnew/v1.0.0.rst @@ -376,6 +376,7 @@ or ``matplotlib.Axes.plot``. See :ref:`plotting.formatters` for more. **Other removals** +- Removed the previously deprecated :meth:`Index.summary` (:issue:`18217`) - Removed the previously deprecated :meth:`Series.get_value`, :meth:`Series.set_value`, :meth:`DataFrame.get_value`, :meth:`DataFrame.set_value` (:issue:`17739`) - Changed the the default value of `inplace` in :meth:`DataFrame.set_index` and :meth:`Series.set_axis`. It now defaults to False (:issue:`27600`) - Removed support for nested renaming in :meth:`DataFrame.aggregate`, :meth:`Series.aggregate`, :meth:`DataFrameGroupBy.aggregate`, :meth:`SeriesGroupBy.aggregate`, :meth:`Rolling.aggregate` (:issue:`18529`) diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 10c0f465f69da..dd38bd0ee5f70 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -1132,19 +1132,6 @@ def _summary(self, name=None): name = type(self).__name__ return f"{name}: {len(self)} entries{index_summary}" - def summary(self, name=None): - """ - Return a summarized representation. - - .. deprecated:: 0.23.0 - """ - warnings.warn( - "'summary' is deprecated and will be removed in a future version.", - FutureWarning, - stacklevel=2, - ) - return self._summary(name) - # -------------------------------------------------------------------- # Conversion Methods diff --git a/pandas/tests/indexes/test_base.py b/pandas/tests/indexes/test_base.py index facc025409f08..15844df5d7b04 100644 --- a/pandas/tests/indexes/test_base.py +++ b/pandas/tests/indexes/test_base.py @@ -1385,13 +1385,6 @@ def test_summary_bug(self): assert "~:{range}:0" in result assert "{other}%s" in result - # GH18217 - def test_summary_deprecated(self): - ind = Index(["{other}%s", "~:{range}:0"], name="A") - - with tm.assert_produces_warning(FutureWarning): - ind.summary() - def test_format(self, indices): self._check_method_works(Index.format, indices)