Skip to content

DEPR: remove Index.summary #29807

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/source/whatsnew/v1.0.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand Down
13 changes: 0 additions & 13 deletions pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the private method any more? Not super familiar with this one but doesn't seem like something we'd use internally?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we use it in DataFrame.info


# --------------------------------------------------------------------
# Conversion Methods

Expand Down
7 changes: 0 additions & 7 deletions pandas/tests/indexes/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down