-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
BUG: Fix .loc/.iloc/.at/iat cast unexpectedly with object dtype #49306
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
Changes from 3 commits
4c1a66b
99e2874
e38615a
717bd88
da20a87
4cce372
0807269
b246f77
533eeb9
f60b4ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -973,8 +973,8 @@ def setitem(self, indexer, value) -> Block: | |
|
||
# length checking | ||
check_setitem_lengths(indexer, value, values) | ||
|
||
value = extract_array(value, extract_numpy=True) | ||
if self.dtype != _dtype_obj: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we even need the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we need the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting - do you know what the failures are? Are they Index-related? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. definitely add a comment here pointing back to the PR/issue might be np_can_hold_element assumes extract_array has been called, don't quote me on that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @xr-chen can you confirm what @jbrockmendel is saying? I'm not sure yet if this is worth doing as is or if we should try to solve the issue comprehensively There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @WillAyd I think he was right, he definitely knows |
||
value = extract_array(value, extract_numpy=True) | ||
try: | ||
casted = np_can_hold_element(values.dtype, value) | ||
except LossySetitemError: | ||
|
Uh oh!
There was an error while loading. Please reload this page.