[Pandas-dev] Proposal for consistent, clear copy/view semantics in pandas with Copy-on-Write

Joris Van den Bossche jorisvandenbossche at gmail.com
Thu Aug 12 16:59:06 EDT 2021


Another follow-up of the discussion we had yesterday: we talked about when
objects get modified and when not (in this proposal), and basically the
rule would be: *"the only way to modify an object (DataFrame or Series) is
to modify the object itself directly"*, or stated in another way: you can
never modify an object by modifying a different object (modifications are
never propagated, as you would have with numpy views).
In Python, we need to take into account "object identity" then (because you
can still have multiple variables/names pointing to the same object), and I
added a section trying to explain that with an example in the google doc:
https://docs.google.com/document/d/1ZCQ9mx3LBMy-nhwRl33_jgcvWo9IWdEfxDNQ2thyTb0/edit#heading=h.ejidwnify2zo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/pandas-dev/attachments/20210812/7011bfc7/attachment.html>


More information about the Pandas-dev mailing list