-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: wrong future Warning on string assignment in certain condition #57402
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
BUG: wrong future Warning on string assignment in certain condition #57402
Conversation
pandas/core/indexing.py
Outdated
# Columns F and G will initially be set to np.void. | ||
# Here, we replace those temporary `np.void` columns with | ||
# columns of the appropriate dtype, based on `value`. | ||
arr = sanitize_array(value, Index(range(1)), copy=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
construct_1d_arraylike_from_scalar
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed during the dev meeting. If the idea is to fill with the appropriate missing value, I think you can use a combination of infer_fill_value
with construct_1d_arraylike_from_scalar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! will update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would run into the same issues that #56321 addressed
I'd factored out the common logic, if there's a better way perhaps it can be addressed separately?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solution seems find except matts comment
Thanks @MarcoGorelli |
…ignment in certain condition
…ng assignment in certain condition) (#57460) Backport PR #57402: BUG: wrong future Warning on string assignment in certain condition Co-authored-by: Marco Edward Gorelli <[email protected]>
…andas-dev#57402) * whatsnew * factor out construct_1d_array_from_inferred_fill_value * 🏷️ typing
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.is this it? finally? 🤞