Skip to content
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

DEPR: fillna downcasting from object dtype #54261

Merged
merged 14 commits into from
Sep 18, 2023

Conversation

jbrockmendel
Copy link
Member

@mroeschke
Copy link
Member

2023-07-26T01:20:55.4868437Z RuntimeError: Non Expected warning in `/home/runner/work/pandas/pandas/doc/source/user_guide/missing_data.rst` line 709

@mroeschke mroeschke added Dtype Conversions Unexpected or buggy dtype conversions Deprecate Functionality to remove in pandas labels Jul 26, 2023
@@ -689,6 +689,7 @@ contains NAs, an exception will be generated:
However, these can be filled in using :meth:`~DataFrame.fillna` and it will work fine:

.. ipython:: python
:okwarning:
Copy link
Member

Choose a reason for hiding this comment

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

Can this be changed to the future usage?

Copy link
Member Author

Choose a reason for hiding this comment

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

wouldn't it be weird to have documented behavior that you cant actually get yet?

Copy link
Member

Choose a reason for hiding this comment

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

Or rather, can this be changed to show the work-around? (Just trying to get ahead when we will have to change this example eventually)

Copy link
Member Author

Choose a reason for hiding this comment

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

Fair enough, I'll take a look in a bit. (Pretty deep in the weeds in the extension tests ATM)

@jbrockmendel
Copy link
Member Author

updated+green

@mroeschke mroeschke merged commit 1496630 into pandas-dev:main Sep 18, 2023
33 checks passed
@mroeschke
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the depr-downcast-fillna branch September 18, 2023 17:45
hedeershowk pushed a commit to hedeershowk/pandas that referenced this pull request Sep 20, 2023
* DEPR: fillna downcasting from object dtype

* GH ref

* suppress warning

* update test

* Update doc/source/whatsnew/v2.1.0.rst

Co-authored-by: Matthew Roeschke <[email protected]>

---------

Co-authored-by: Matthew Roeschke <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas Dtype Conversions Unexpected or buggy dtype conversions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG/API: Clarify the behaviour of fillna downcasting
2 participants