Skip to content

ENH: test CoW for drop_level #50552

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

Merged
merged 6 commits into from
Jan 5, 2023

Conversation

davidleon123
Copy link
Contributor

Copy on write for droplevel

Copy link
Member

@phofl phofl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good generally, but needs a rebase and you should install pre-commit locally for linting purposes

assert not np.shares_memory(get_array(df2, "c"), get_array(df, "c"))

# mutating df2 triggers a copy-on-write for that column / block
df2.loc[4, "c"] = 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you create the DataFrame without set_index and also use iloc[0, 0] here?

Merge remote-tracking branch 'upstream/main' into cow_drop_level
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! Looks good

@jorisvandenbossche jorisvandenbossche merged commit f816fb9 into pandas-dev:main Jan 5, 2023
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