Skip to content

BUG: lib.infer_dtype with incompatible intervals #41749

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
Jun 2, 2021

Conversation

jbrockmendel
Copy link
Member

Nothing user-facing.

cdef:
IntervalValidator validator = IntervalValidator(len(values),
skipna=True)
return validator.validate(values)
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 remove the IntervalValidator code?

Copy link
Member Author

Choose a reason for hiding this comment

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

sure, will add that to the upcoming misc branch

Copy link
Contributor

Choose a reason for hiding this comment

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

kk

@jreback jreback added Interval Interval data type Dtype Conversions Unexpected or buggy dtype conversions labels May 31, 2021
return False
else:
raise ValueError(val)
elif util.is_nan(val) or val is None:
Copy link
Contributor

Choose a reason for hiding this comment

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

couldn't this be a float nan or NA? (or None)? i am not sure we really specify

Copy link
Member Author

Choose a reason for hiding this comment

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

this matches what we do in corresponding libinterval function

Copy link
Contributor

Choose a reason for hiding this comment

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

got it
ok i think we should open an issue about this (eg letting the missing value be NA) or NaT if it's a datetimelike in a new issue as this is a bit inconsistent with what we allow for missing values in other dtypes

but out of scope for this PR

return False

if closed is None:
# we saw all-NaTs, no actual Intervals
Copy link
Contributor

Choose a reason for hiding this comment

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

all-missing / nan?

Copy link
Member Author

Choose a reason for hiding this comment

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

yah, will update in the follow-on brnach

Copy link
Member Author

Choose a reason for hiding this comment

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

updated + green

@jreback jreback added this to the 1.3 milestone Jun 2, 2021
@jreback jreback merged commit b1e62a1 into pandas-dev:master Jun 2, 2021
@jbrockmendel jbrockmendel deleted the bug-infer_interval-2 branch June 2, 2021 02:34
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dtype Conversions Unexpected or buggy dtype conversions Interval Interval data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants