Skip to content

Conversation

@jbrockmendel
Copy link
Member

No description provided.

# --------------------------------------------------------------------
# Set Methods

def union(self, other, sort=None):
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

restored + greenish

@jreback jreback added Index Related to the Index class or subclasses Refactor Internal refactoring of code labels Dec 24, 2020
@jreback jreback added this to the 1.3 milestone Dec 24, 2020
if isinstance(self, ABCMultiIndex) and not is_object_dtype(
unpack_nested_dtype(other)
):
raise NotImplementedError(
Copy link
Contributor

Choose a reason for hiding this comment

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

hit in tests?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes

right = other.astype(dtype, copy=False)
return left.union(right, sort=sort)

elif not len(other) or self.equals(other):
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes

@jreback jreback merged commit e744559 into pandas-dev:master Dec 24, 2020
@jreback
Copy link
Contributor

jreback commented Dec 24, 2020

thanks would be super helpful to either disable / fix the failing travis build (it's a locale one i think)

@jbrockmendel jbrockmendel deleted the setops branch December 24, 2020 22:27
luckyvs1 pushed a commit to luckyvs1/pandas that referenced this pull request Jan 20, 2021
* BUG: MultiIndex, IntervalIndex intersection with Categorical

* standardize

* Share intersection

* REF: share Index.union

* move doctest examples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Index Related to the Index class or subclasses Refactor Internal refactoring of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants