diff --git a/doc/source/whatsnew/v3.0.0.rst b/doc/source/whatsnew/v3.0.0.rst index cb8798c4a5565..37bea1b7ff794 100644 --- a/doc/source/whatsnew/v3.0.0.rst +++ b/doc/source/whatsnew/v3.0.0.rst @@ -80,8 +80,8 @@ and how to adapt your code to the new default. .. _whatsnew_300.enhancements.copy_on_write: -Copy-on-Write -^^^^^^^^^^^^^ +Consistent copy/view behaviour with Copy-on-Write +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The new "copy-on-write" behaviour in pandas 3.0 brings changes in behavior in how pandas operates with respect to copies and views. A summary of the changes: @@ -101,9 +101,10 @@ copy or a view depended on the exact operation performed, which was often confusing). Because every single indexing step now behaves as a copy, this also means that -"chained assignment" (updating a DataFrame with multiple setitem steps) will -stop working. Because this now consistently never works, the -``SettingWithCopyWarning`` is removed. +**"chained assignment"** (updating a DataFrame with multiple setitem steps) +**will stop working**. Because this now consistently never works, the +``SettingWithCopyWarning`` is removed, and defensive ``.copy()`` calls to +silence the warning are no longer needed. The new behavioral semantics are explained in more detail in the :ref:`user guide about Copy-on-Write `. diff --git a/web/pandas/community/blog/pandas-3.0-release-candidate.md b/web/pandas/community/blog/pandas-3.0-release-candidate.md index e1f107f9bcd2d..141bd1bd417f9 100644 --- a/web/pandas/community/blog/pandas-3.0-release-candidate.md +++ b/web/pandas/community/blog/pandas-3.0-release-candidate.md @@ -14,18 +14,18 @@ release candidate now](#call-to-action-test-the-release-candidate). pandas 3.0 introduces several major enhancements: -- **Dedicated string data type by default**: String columns are now inferred as +- **Dedicated string data type by default**: string columns are now inferred as the new `str` dtype instead of `object`, providing better performance and type safety - **Consistent copy/view behaviour with Copy-on-Write (CoW)** (a.k.a. getting - rid of the SettingWithCopyWarning): More predictable and consistent behavior + rid of the SettingWithCopyWarning): more predictable and consistent behavior for all operations, with improved performance through avoiding unnecessary copies -- **New `pd.col` syntax**: Initial support for `pd.col()` as a simplified syntax +- **New `pd.col` syntax**: initial support for `pd.col()` as a simplified syntax for creating callables in `DataFrame.assign` -Together with a lot of other improvements and bug fixes. You can find the -complete list of changes in our +Further, pandas 3.0 includes a lot of other improvements and bug fixes. You can +find the complete list of changes in our [release notes](https://pandas.pydata.org/docs/dev/whatsnew/v3.0.0.html). ## Important changes requiring code updates