Skip to content

Commit 98f5f35

Browse files
jbrockmendelproost
authored andcommitted
DEPR: remove Index.summary (pandas-dev#29807)
1 parent 1f01767 commit 98f5f35

File tree

3 files changed

+1
-20
lines changed

3 files changed

+1
-20
lines changed

doc/source/whatsnew/v1.0.0.rst

+1
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ or ``matplotlib.Axes.plot``. See :ref:`plotting.formatters` for more.
376376

377377
**Other removals**
378378

379+
- Removed the previously deprecated :meth:`Index.summary` (:issue:`18217`)
379380
- Removed the previously deprecated :meth:`Series.get_value`, :meth:`Series.set_value`, :meth:`DataFrame.get_value`, :meth:`DataFrame.set_value` (:issue:`17739`)
380381
- Changed the the default value of `inplace` in :meth:`DataFrame.set_index` and :meth:`Series.set_axis`. It now defaults to False (:issue:`27600`)
381382
- Removed support for nested renaming in :meth:`DataFrame.aggregate`, :meth:`Series.aggregate`, :meth:`DataFrameGroupBy.aggregate`, :meth:`SeriesGroupBy.aggregate`, :meth:`Rolling.aggregate` (:issue:`18529`)

pandas/core/indexes/base.py

-13
Original file line numberDiff line numberDiff line change
@@ -1132,19 +1132,6 @@ def _summary(self, name=None):
11321132
name = type(self).__name__
11331133
return f"{name}: {len(self)} entries{index_summary}"
11341134

1135-
def summary(self, name=None):
1136-
"""
1137-
Return a summarized representation.
1138-
1139-
.. deprecated:: 0.23.0
1140-
"""
1141-
warnings.warn(
1142-
"'summary' is deprecated and will be removed in a future version.",
1143-
FutureWarning,
1144-
stacklevel=2,
1145-
)
1146-
return self._summary(name)
1147-
11481135
# --------------------------------------------------------------------
11491136
# Conversion Methods
11501137

pandas/tests/indexes/test_base.py

-7
Original file line numberDiff line numberDiff line change
@@ -1385,13 +1385,6 @@ def test_summary_bug(self):
13851385
assert "~:{range}:0" in result
13861386
assert "{other}%s" in result
13871387

1388-
# GH18217
1389-
def test_summary_deprecated(self):
1390-
ind = Index(["{other}%s", "~:{range}:0"], name="A")
1391-
1392-
with tm.assert_produces_warning(FutureWarning):
1393-
ind.summary()
1394-
13951388
def test_format(self, indices):
13961389
self._check_method_works(Index.format, indices)
13971390

0 commit comments

Comments
 (0)