-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
REF: share Index.union #38671
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
REF: share Index.union #38671
Conversation
@@ -3502,98 +3502,9 @@ def equal_levels(self, other) -> bool: | |||
# -------------------------------------------------------------------- | |||
# Set Methods | |||
|
|||
def union(self, other, sort=None): |
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.
can you add these examples to the existing Index.union doc-string?
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.
restored + greenish
if isinstance(self, ABCMultiIndex) and not is_object_dtype( | ||
unpack_nested_dtype(other) | ||
): | ||
raise NotImplementedError( |
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.
hit in tests?
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.
yes
@@ -2680,6 +2727,14 @@ def union(self, other, sort=None): | |||
right = other.astype(dtype, copy=False) | |||
return left.union(right, sort=sort) | |||
|
|||
elif not len(other) or self.equals(other): |
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.
coverage for all of these?
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.
yes
thanks would be super helpful to either disable / fix the failing travis build (it's a locale one i think) |
* BUG: MultiIndex, IntervalIndex intersection with Categorical * standardize * Share intersection * REF: share Index.union * move doctest examples
No description provided.