Skip to content

Commit

Permalink
DOC: Add note for copy keywords for Copy-on-Write
Browse files Browse the repository at this point in the history
  • Loading branch information
phofl committed Nov 17, 2023
1 parent 87d3fe4 commit 1de4907
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -6428,6 +6428,15 @@ def astype(
Return a copy when ``copy=True`` (be very careful setting
``copy=False`` as changes to values then may propagate to other
pandas objects).
.. note::
The copy-keyword will change behavior in pandas 3.0.
`Copy-on-Write
<https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
will be enabled by default, which means that all methods with a
copy-keyword will use a lazy copy mechanism and ignore the copy
keyword. The copy-keyword will be removed in a future version of
pandas.
errors : {'raise', 'ignore'}, default 'raise'
Control raising of exceptions on invalid data for provided dtype.
Expand Down

0 comments on commit 1de4907

Please sign in to comment.