Skip to content

DOC: Update CoW user guide docs #57866

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 2 commits into from
Mar 16, 2024
Merged

DOC: Update CoW user guide docs #57866

merged 2 commits into from
Mar 16, 2024

Conversation

phofl
Copy link
Member

@phofl phofl commented Mar 16, 2024

Just a few clean ups after the deprecation

@phofl phofl added this to the 3.0 milestone Mar 16, 2024
@phofl phofl added the Docs label Mar 16, 2024
Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

lgtm, thanks @phofl

df = pd.DataFrame({"foo": [1, 2, 3], "bar": [4, 5, 6]})
subset = df["foo"]
subset.iloc[0] = 100
df

Mutating ``subset``, e.g. updating its values, also updates ``df``. The exact behavior is
hard to predict. Copy-on-Write solves accidentally modifying more than one object,
it explicitly disallows this. With CoW enabled, ``df`` is unchanged:
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to update the With CoW enabled wording?

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, thx

@phofl phofl merged commit 5c11167 into pandas-dev:main Mar 16, 2024
7 of 9 checks passed
@phofl phofl deleted the cow_docs1 branch March 16, 2024 17:24
pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copy-on-Write Guide - "Previous behavior" output is what would happen post-migration to CoW
2 participants