Skip to content

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

Closed
@jorisvandenbossche

Description

@jorisvandenbossche

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions