Skip to content

BUG: IntervalArray.__cmp__(pd.NA) #44830

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 3 commits into from
Dec 11, 2021

Conversation

jbrockmendel
Copy link
Member

Could repurpose #31882 to be about the more general case and not just IntervalArray?

DataFrame cases fail in a way that would be avoided with 2D EAs.

@jreback jreback added Bug Interval Interval data type labels Dec 9, 2021
elif isinstance(obj, pd.core.arrays.BooleanArray):
return obj
elif isinstance(dtype, IntervalDtype):
return pd.core.arrays.IntervalArray(obj)
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 use is_interval_dtype to be consistent

@jbrockmendel
Copy link
Member Author

jbrockmendel commented Dec 9, 2021 via email

@jreback jreback added this to the 1.4 milestone Dec 11, 2021
@jreback jreback merged commit 1113779 into pandas-dev:master Dec 11, 2021
@jreback
Copy link
Contributor

jreback commented Dec 11, 2021

if you can add a whatsnew in followon

@jbrockmendel jbrockmendel deleted the bug-interval-na branch December 12, 2021 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Interval Interval data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

np.nan comparison to pd.NA Equality Semantics differ elementwise in IntervalArray
2 participants