Skip to content

CoW: Add warning for fillna #56288

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 11 commits into from
Dec 5, 2023
Merged

Conversation

phofl
Copy link
Member

@phofl phofl commented Dec 1, 2023

sits on the put mask pr #56168

xref #56019

@mroeschke mroeschke added Compat pandas objects compatability with Numpy or Python functions Warnings Warnings that appear or should be added to pandas labels Dec 2, 2023
@jorisvandenbossche jorisvandenbossche added Copy / view semantics and removed Compat pandas objects compatability with Numpy or Python functions labels Dec 4, 2023
@jorisvandenbossche jorisvandenbossche added this to the 2.2 milestone Dec 4, 2023
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.

Looks good!

Comment on lines +2253 to +2258
if (
not copy
and warn_copy_on_write()
and already_warned is not None
and not already_warned.warned_already
):
Copy link
Member

Choose a reason for hiding this comment

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

Should this only be done in case of inplace=True? Or is that already embodied in the not copy?

Copy link
Member Author

Choose a reason for hiding this comment

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

copy is only False if inplace is True

Co-authored-by: Joris Van den Bossche <[email protected]>
@jorisvandenbossche jorisvandenbossche merged commit 52649ea into pandas-dev:main Dec 5, 2023
@phofl phofl deleted the cow_fillna_warn branch December 5, 2023 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Copy / view semantics Warnings Warnings that appear or should be added to pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants