-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
CoW: Fix deprecation warning for chained assignment #56166
Conversation
Oh I am looking forward to ripping out all that code ;) |
Yes me too, I call dips on doing that :) |
def test_methods_iloc_getitem_item_cache(func, args, using_copy_on_write): | ||
df = DataFrame({"a": [1, 2, 3], "b": 1}) | ||
ser = df.iloc[:, 0] | ||
getattr(ser, func)(*args, inplace=True) |
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.
This should raise a warning?
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.
(or is that something we haven't implemented yet)
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.
That should raise but we haven’t done that yet I think, but it shouldn’t raise a chained assignment warning, which is what happens on main right now
the implementation will look similar to #56168
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 a lot!
Merging this so I can use it in my chained assignment PR
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.I hate the SettingWithCopyWarning mechanism...
2 cases were fixed here:
xref #56019