Skip to content
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

Merged
merged 5 commits into from
Dec 4, 2023
Merged

Conversation

phofl
Copy link
Member

@phofl phofl commented Nov 25, 2023

This is an option if eval can't do inplace on numpy under the hood

xref #56019

clean_column_name(k): Series(
v._values, copy=False, index=v.index
).__finalize__(v)
for k, v in self.items()
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member

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

@jorisvandenbossche jorisvandenbossche added this to the 2.2 milestone Dec 4, 2023
@jorisvandenbossche jorisvandenbossche merged commit e0f3a18 into pandas-dev:main Dec 4, 2023
44 checks passed
@phofl phofl deleted the cow_eval branch December 4, 2023 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants