Skip to content

DOC: Update the DataFrame.copy docstring to note different behaviour with Copy-on-Write #53718

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

Closed
jorisvandenbossche opened this issue Jun 19, 2023 · 2 comments · Fixed by #54425

Comments

@jorisvandenbossche
Copy link
Member

Currently the copy() method docstring shows several examples how mutations are propagated for shallow copies ("Any changes to the data of the original will be reflected in the shallow copy (and vice versa)." in the main description, "Updates to the data shared by shallow copy and original is reflected in both; deep copy remains unchanged." in the examples section)

While is this of course still correct with the default behaviour, given that this is completely incorrect when CoW is enabled, I would at least start with adding a note about this (and for example referring to the Copy-on-Write documentation).

@punndcoder28
Copy link
Contributor

Hi! I can take this up if it is not already being worked on.

@sqali
Copy link
Contributor

sqali commented Jul 3, 2023

Hi @jorisvandenbossche ,

I would love to take up this issue. May I have the link to the file that we need to update?

mroeschke pushed a commit that referenced this issue Aug 10, 2023
)

* reformat

* iloc

* option_context

* tab spacing

* reformat
mroeschke pushed a commit to mroeschke/pandas that referenced this issue Aug 18, 2023
…ethod (pandas-dev#54425)

* reformat

* iloc

* option_context

* tab spacing

* reformat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants