-
-
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 warnings for eval #56170
CoW: Fix warnings for eval #56170
Conversation
pandas/core/generic.py
Outdated
clean_column_name(k): Series( | ||
v._values, copy=False, index=v.index | ||
).__finalize__(v) | ||
for k, v in self.items() |
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.
Maybe you can use _iter_column_arrays
here instead of items()
to avoid going through Series construction twice?
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.
Yep that should work, thx
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.
With my suggestion, the column name was lost. Hopefully the last commit should fix that
This is an option if eval can't do inplace on numpy under the hood
xref #56019