-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: fix StringArray/PandasArray setitem with slice #31773
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
Conversation
scalar_value = lib.is_scalar(value) | ||
|
||
if not scalar_key and scalar_value: | ||
key = np.asarray(key) |
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.
@TomAugspurger do you remember why this was needed?
(I can also do a and not isinstance(key, slice)
to be more conservative, but can't directly come up with a reason to keep it)
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 don’t recall.
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.
lgtm
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.
can you also add the test you had in the OP, e.g. the .loc on a frame.
thanks! |
@meeseeksdev backport to 1.0.x |
…ce (#31923) Co-authored-by: Joris Van den Bossche <[email protected]>
Closes #31772