Skip to content

BUG: Index._id #37321

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 2 commits into from
Oct 22, 2020
Merged
Changes from 1 commit
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
Prev Previous commit
Make comparions more explicit
  • Loading branch information
topper-123 committed Oct 22, 2020
commit 677910d674234c0c2674d1d6b43bba5bbd265fdc
6 changes: 5 additions & 1 deletion pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,12 @@ def is_(self, other) -> bool:
"""
if self is other:
return True
elif not hasattr(other, "_id"):
return False
elif com.any_none(self._id, other._id):
return False
else:
return self._id is not None and self._id is getattr(other, "_id", Ellipsis)
return self._id is other._id

def _reset_identity(self) -> None:
"""
Expand Down