-
Notifications
You must be signed in to change notification settings - Fork 358
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
Implement Index/MultiIndex.equals #1216
Conversation
HyukjinKwon
commented
Jan 23, 2020
•
edited
Loading
edited
d99e19b
to
4ac9841
Compare
Codecov Report
@@ Coverage Diff @@
## master #1216 +/- ##
==========================================
- Coverage 95.21% 95.21% -0.01%
==========================================
Files 35 35
Lines 7254 7252 -2
==========================================
- Hits 6907 6905 -2
Misses 347 347
Continue to review full report at Codecov.
|
I am merging this for today's release. |
For Index | ||
|
||
>>> idx.equals(idx) | ||
False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this False
? Also, for identical
?
>>> import pandas as pd
>>> idx = pd.Index(['a', 'b', 'c'])
>>> idx.equals(idx)
True
>>> idx.identical(idx)
True
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Submitted a PR #1220.
For MultiIndex | ||
|
||
>>> midx.equals(midx) | ||
False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto.
>>> midx = pd.MultiIndex.from_tuples([('a', 'x'), ('b', 'y'), ('c', 'z')])
>>> midx.names = ("nameA", "nameB")
>>> midx.equals(midx)
True
>>> midx.identical(midx)
True