BUG/API: Series[object].fillna ignores downcast=None, "infer" #44241
Labels
Bug
Dtype Conversions
Unexpected or buggy dtype conversions
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Milestone
Uh oh!
There was an error while loading. Please reload this page.
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the master branch of pandas.
Reproducible Example
Issue Description
Note that downcast=None is the default, so this also happens with just
ser.fillna(True)
.Disabling the special-casing for object dtype in Block._maybe_downcast breaks 9 tests. I need to check, think there may be some EA cases that aren't tested but where behavior would change if removed that special-casing.
Expected Behavior
I'd expect it to go the other way, with object dtype retained with downcast=None and bool inferred with downcast="infer"
Installed Versions
Replace this line with the output of pd.show_versions()
The text was updated successfully, but these errors were encountered: