Skip to content

DOC: Update the pandas.Index.is_ docstring #32357

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

Closed
wants to merge 1 commit into from
Closed
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
10 changes: 8 additions & 2 deletions pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,17 @@ def is_(self, other) -> bool:
Parameters
----------
other : object
other object to compare against.
Other object to compare against.

Returns
-------
True if both have same underlying data, False otherwise : bool
bool
Boolean indicating if both object have same underlying data,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Boolean indicating if both object have same underlying data,
True if both object have same underlying data, False otherwise.

False otherwise.

See Also
--------
Index.identical : Works like Index.is_ but also check metadata.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Index.identical : Works like Index.is_ but also check metadata.
identical : Works like ``Index.is_`` but also check metadata.

Might fix CI

Copy link
Member

Choose a reason for hiding this comment

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

I don't really understand the build error.

I think we need to keep the Index in Index.identical.

You can also try:

Suggested change
Index.identical : Works like Index.is_ but also check metadata.
Index.identical : Same but also checks metadata.

"""
# use something other than None to be clearer
return self._id is getattr(other, "_id", Ellipsis) and self._id is not None
Expand Down