-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
ENH / CoW: Add lazy copy to eval #53746
Conversation
pandas/core/computation/eval.py
Outdated
target = env.target.copy() | ||
target = env.target | ||
if isinstance(target, NDFrame): | ||
target = target.copy(deep=not using_copy_on_write()) |
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.
You could also do target.copy(deep=None)
here, which will have the same effect (without having to import using_copy_on_write
here). I think this is how we did it in most places that had a self.copy()
in the method
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.
Forgot about that, thx
The typing error is related? (don't see it on main, and it happens in the eval.py file, although I don't see how it actually can be related ..) |
The ignore didn't seem to have worked .. |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.