Skip to content

BUG: Series[Interval].fillna(mismatched) coerce instead of raise #45796

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 2 commits into from
Feb 4, 2022

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx (Replace xxxx with the Github issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

Achieves consistency across methods in coercion behavior for IntervalDtype.

@jbrockmendel
Copy link
Member Author

@jreback most recent commit fixes a mypy complaint on main

@@ -282,6 +282,7 @@ Indexing
Missing
^^^^^^^
- Bug in :meth:`Series.fillna` and :meth:`DataFrame.fillna` with ``downcast`` keyword not being respected in some cases where there are no NA values present (:issue:`45423`)
- Bug in :meth:`Series.fillna` and :meth:`DataFrame.fillna` with :class:`IntervalDtype` and incompatible value raising instead of casting to a common (usually object) dtype (:issue:`??`)
Copy link
Member

Choose a reason for hiding this comment

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

?? -> 45796 (follow up reminder)

Copy link
Member

Choose a reason for hiding this comment

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

included in #45940

@jreback jreback added Bug Dtype Conversions Unexpected or buggy dtype conversions labels Feb 4, 2022
@jreback jreback added this to the 1.5 milestone Feb 4, 2022
@jreback
Copy link
Contributor

jreback commented Feb 4, 2022

got it minor comment u can do in a follow up?

@jreback jreback merged commit 899a6bf into pandas-dev:main Feb 4, 2022
@jbrockmendel
Copy link
Member Author

got it minor comment u can do in a follow up?

yes

@jbrockmendel jbrockmendel deleted the interval-fillna-cast branch February 4, 2022 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Dtype Conversions Unexpected or buggy dtype conversions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants