-
Notifications
You must be signed in to change notification settings - Fork 912
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
Fix Index.difference
to match with pandas
#14053
Fix Index.difference
to match with pandas
#14053
Conversation
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.
Looks good overall, but I think there's a missing corner-case in the reconstruct logic, and cupy appears to be a bit fast than conversion to a frame for the unique
call
Does this close #14013? |
Yup. Linked to the PR. |
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.
Thanks! (Didn't know an index could have nulls!)
/merge |
Description
This PR fixes
Index.difference
in following ways:name
preservation by correctly evaluating the name of two input objects, closes [BUG] Incorrectname
selection inIndex.difference
when an object with no-name is passed #14019is_mixed_with_object_dtype
handling that will resolve incorrect results forCategoricalIndex
, closes [BUG]CategoricalIndex
leading to incorrect results inIndex.difference
#14022Range._try_reconstruct_range_index
that will try to re-construct aRangeIndex
out of anInt..Index
to save memory- this is on parity with pandas. closes [FEA]: Preserve RangeIndex in more setops cases #14013Checklist