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: downcast kwd in fillna #45105

Closed

Conversation

jbrockmendel
Copy link
Member

I'm on the fence about this. downcast="infer" seems pretty useful, as evidenced by how often it shows up in the tests. We don't have anything analogous to infer_objects for "see if i can losslessly downcast numeric values".

If we go forward with this, probably need to deprecate within NDFrame.interpolate too, as apparently some but not all interpolate paths see this deprecation.

@jreback
Copy link
Contributor

jreback commented Dec 29, 2021

i'm on the fence about this. downcast="infer" seems pretty useful, as evidenced by how often it shows up in the tests

this was intended original to be a performance hit avoider, e.g. if the fillna ended up in object dtype we would automatically try to reconvert. but this seems silly as we do this elsewhere. so +1 on deprecating.

it was never intended to be a numeric downcaster (nor should it), we have to_numeric for that and it need to be explict

@jreback jreback added Deprecate Functionality to remove in pandas Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate labels Dec 29, 2021
@jbrockmendel
Copy link
Member Author

Mothballing pending re-thinking.

@jbrockmendel jbrockmendel added the Mothballed Temporarily-closed PR the author plans to return to label Dec 31, 2021
@jbrockmendel jbrockmendel removed the Mothballed Temporarily-closed PR the author plans to return to label Nov 28, 2022
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 Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DEPR: Deprecate downcast keyword for fillna
2 participants