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: automatic upcasting on invalid reindex fill_value #53910

Open
jbrockmendel opened this issue Jun 28, 2023 · 0 comments
Open

DEPR: automatic upcasting on invalid reindex fill_value #53910

jbrockmendel opened this issue Jun 28, 2023 · 0 comments
Labels
Deprecate Functionality to remove in pandas Needs Discussion Requires discussion from core team before further action

Comments

@jbrockmendel
Copy link
Member

jbrockmendel commented Jun 28, 2023

ser = pd.Series([1, 2, 3])

>>> ser.reindex([4, 5, 6], fill_value="foo")
4    foo
5    foo
6    foo
dtype: object

PDEP-6 is moving us away from automatic upcasting in __setitem__-like operations. #53868 and #53802 suggest doing the same (with possible int->float exception) for unstack and shift, respectively. I think that just leaves reindex. Maybe we should call this behavior a footgun and deprecate it across the board?

@jbrockmendel jbrockmendel added Bug Deprecate Functionality to remove in pandas Needs Discussion Requires discussion from core team before further action Needs Triage Issue that has not been reviewed by a pandas team member and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jun 28, 2023
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 Needs Discussion Requires discussion from core team before further action
Projects
None yet
Development

No branches or pull requests

1 participant