From e3c56624cdf1c392d41e0549f5975625d3145a58 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Mon, 8 Dec 2025 11:06:13 +0100 Subject: [PATCH] DOC: update description for deprecated copy keyword in docstrings (CoW is not in effect) --- pandas/core/frame.py | 109 +++++++---------- pandas/core/generic.py | 218 ++++++++++++++-------------------- pandas/core/reshape/concat.py | 22 ++-- pandas/core/reshape/merge.py | 21 ++-- pandas/core/series.py | 127 +++++++++----------- 5 files changed, 209 insertions(+), 288 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 7d4c0b6b6e80e..9d6af3c7b9917 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -379,21 +379,18 @@ `right` should be left as-is, with no suffix. At least one of the values must not be None. copy : bool, default False - If False, avoid copy if possible. + This keyword is now ignored; changing its value will have no + impact on the method. - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write - `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy and - ignore the `copy` keyword. The `copy` keyword will be removed in a - future version of pandas. + .. deprecated:: 3.0.0 - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write + `__ + for more details. - .. deprecated:: 3.0.0 indicator : bool or str, default False If True, adds a column to the output DataFrame called "_merge" with information on the source of each row. The column can be given a different @@ -3900,26 +3897,21 @@ def transpose( *args : tuple, optional Accepted for compatibility with NumPy. copy : bool, default False - Whether to copy the data after transposing, even for DataFrames - with a single dtype. + This keyword is now ignored; changing its value will have no + impact on the method. Note that a copy is always required for mixed dtype DataFrames, or for DataFrames with any extension types. - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write - `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy and - ignore the `copy` keyword. The `copy` keyword will be removed in a - future version of pandas. - - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` - .. deprecated:: 3.0.0 + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write + `__ + for more details. + Returns ------- DataFrame @@ -5949,21 +5941,18 @@ def rename( Axis to target with ``mapper``. Can be either the axis name ('index', 'columns') or number (0, 1). The default is 'index'. copy : bool, default False - Also copy underlying data. + This keyword is now ignored; changing its value will have no + impact on the method. - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write - `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy and - ignore the `copy` keyword. The `copy` keyword will be removed in a - future version of pandas. + .. deprecated:: 3.0.0 - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write + `__ + for more details. - .. deprecated:: 3.0.0 inplace : bool, default False Whether to modify the DataFrame rather than creating a new one. If True then value of copy is ignored. @@ -13988,22 +13977,18 @@ def to_timestamp( axis : {0 or 'index', 1 or 'columns'}, default 0 The axis to convert (the index by default). copy : bool, default False - If False then underlying input data is not copied. - - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write - `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy and - ignore the `copy` keyword. The `copy` keyword will be removed in a - future version of pandas. - - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` + This keyword is now ignored; changing its value will have no + impact on the method. .. deprecated:: 3.0.0 + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write + `__ + for more details. + Returns ------- DataFrame with DatetimeIndex @@ -14078,22 +14063,18 @@ def to_period( axis : {0 or 'index', 1 or 'columns'}, default 0 The axis to convert (the index by default). copy : bool, default False - If False then underlying input data is not copied. - - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write - `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy and - ignore the `copy` keyword. The `copy` keyword will be removed in a - future version of pandas. - - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` + This keyword is now ignored; changing its value will have no + impact on the method. .. deprecated:: 3.0.0 + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write + `__ + for more details. + Returns ------- DataFrame diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 955ccf1492fa0..6d1ad777619ea 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -418,21 +418,18 @@ def set_flags( Parameters ---------- copy : bool, default False - Specify if a copy of the object should be made. + This keyword is now ignored; changing its value will have no + impact on the method. - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write - `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy and - ignore the `copy` keyword. The `copy` keyword will be removed in a - future version of pandas. + .. deprecated:: 3.0.0 - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write + `__ + for more details. - .. deprecated:: 3.0.0 allows_duplicate_labels : bool, optional Whether the returned object allows duplicate labels. @@ -716,22 +713,18 @@ def set_axis( this parameter is unused and defaults to 0. copy : bool, default False - Whether to make a copy of the underlying data. - - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write - `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy and - ignore the `copy` keyword. The `copy` keyword will be removed in a - future version of pandas. - - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` + This keyword is now ignored; changing its value will have no + impact on the method. .. deprecated:: 3.0.0 + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write + `__ + for more details. + Returns ------- %(klass)s @@ -1147,21 +1140,18 @@ def rename_axis( axis : {0 or 'index', 1 or 'columns'}, default 0 The axis to rename. copy : bool, default False - Also copy underlying data. + This keyword is now ignored; changing its value will have no + impact on the method. - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write - `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy and - ignore the `copy` keyword. The `copy` keyword will be removed in a - future version of pandas. + .. deprecated:: 3.0.0 - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write + `__ + for more details. - .. deprecated:: 3.0.0 inplace : bool, default False Modifies the object directly, instead of creating a new Series or DataFrame. @@ -4439,21 +4429,18 @@ def reindex_like( * nearest: use nearest valid observations to fill gap. copy : bool, default False - Return a new object, even if the passed indexes are the same. + This keyword is now ignored; changing its value will have no + impact on the method. - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write - `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy and - ignore the `copy` keyword. The `copy` keyword will be removed in a - future version of pandas. + .. deprecated:: 3.0.0 - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write + `__ + for more details. - .. deprecated:: 3.0.0 limit : int, default None Maximum number of consecutive labels to fill for inexact matches. tolerance : optional @@ -5201,21 +5188,18 @@ def reindex( * nearest: Use nearest valid observations to fill gap. copy : bool, default False - Return a new object, even if the passed indexes are the same. + This keyword is now ignored; changing its value will have no + impact on the method. - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write - `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy and - ignore the `copy` keyword. The `copy` keyword will be removed in a - future version of pandas. + .. deprecated:: 3.0.0 - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write + `__ + for more details. - .. deprecated:: 3.0.0 level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level. @@ -6701,23 +6685,18 @@ def infer_objects(self, copy: bool | lib.NoDefault = lib.no_default) -> Self: Parameters ---------- copy : bool, default False - Whether to make a copy for non-object or non-inferable columns - or Series. - - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write - `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy and - ignore the `copy` keyword. The `copy` keyword will be removed in a - future version of pandas. - - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` + This keyword is now ignored; changing its value will have no + impact on the method. .. deprecated:: 3.0.0 + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write + `__ + for more details. + Returns ------- same type as input object @@ -9387,22 +9366,18 @@ def align( Broadcast across a level, matching Index values on the passed MultiIndex level. copy : bool, default False - Always returns new objects. If copy=False and no reindexing is - required then original objects are returned. + This keyword is now ignored; changing its value will have no + impact on the method. - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write - `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy and - ignore the `copy` keyword. The `copy` keyword will be removed in a - future version of pandas. + .. deprecated:: 3.0.0 - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write + `__ + for more details. - .. deprecated:: 3.0.0 fill_value : scalar, default np.nan Value to use for missing values. Defaults to NaN, but can be any "compatible" value. @@ -10235,23 +10210,19 @@ def truncate( axis : {0 or 'index', 1 or 'columns'}, optional Axis to truncate. Truncates the index (rows) by default. For `Series` this parameter is unused and defaults to 0. - copy : bool, default is False, - Return a copy of the truncated section. - - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write - `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy and - ignore the `copy` keyword. The `copy` keyword will be removed in a - future version of pandas. - - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` + copy : bool, default False + This keyword is now ignored; changing its value will have no + impact on the method. .. deprecated:: 3.0.0 + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write + `__ + for more details. + Returns ------- type of caller @@ -10421,22 +10392,18 @@ def tz_convert( If axis is a MultiIndex, convert a specific level. Otherwise must be None. copy : bool, default False - Also make a copy of the underlying data. - - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write - `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy and - ignore the `copy` keyword. The `copy` keyword will be removed in a - future version of pandas. - - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` + This keyword is now ignored; changing its value will have no + impact on the method. .. deprecated:: 3.0.0 + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write + `__ + for more details. + Returns ------- {klass} @@ -10530,21 +10497,18 @@ def tz_localize( If axis ia a MultiIndex, localize a specific level. Otherwise must be None. copy : bool, default False - Also make a copy of the underlying data. + This keyword is now ignored; changing its value will have no + impact on the method. - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write - `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy and - ignore the `copy` keyword. The `copy` keyword will be removed in a - future version of pandas. + .. deprecated:: 3.0.0 - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write + `__ + for more details. - .. deprecated:: 3.0.0 ambiguous : 'infer', bool, bool-ndarray, 'NaT', default 'raise' When clocks moved backward due to DST, ambiguous times may arise. For example in Central European Time (UTC+01), when going from diff --git a/pandas/core/reshape/concat.py b/pandas/core/reshape/concat.py index 7d5d6bac9db41..2db8655a882ca 100644 --- a/pandas/core/reshape/concat.py +++ b/pandas/core/reshape/concat.py @@ -210,22 +210,18 @@ def concat( not already aligned. In that case, the non-concatenation axis is always sorted lexicographically. copy : bool, default False - If False, do not copy data unnecessarily. - - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write - `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy and - ignore the `copy` keyword. The `copy` keyword will be removed in a - future version of pandas. - - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` + This keyword is now ignored; changing its value will have no + impact on the method. .. deprecated:: 3.0.0 + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write + `__ + for more details. + Returns ------- object, type of objs diff --git a/pandas/core/reshape/merge.py b/pandas/core/reshape/merge.py index e24e73ff5557d..8f9eafded2831 100644 --- a/pandas/core/reshape/merge.py +++ b/pandas/core/reshape/merge.py @@ -229,21 +229,18 @@ def merge( `right` should be left as-is, with no suffix. At least one of the values must not be None. copy : bool, default False - If False, avoid copy if possible. + This keyword is now ignored; changing its value will have no + impact on the method. - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write - `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy and - ignore the `copy` keyword. The `copy` keyword will be removed in a - future version of pandas. + .. deprecated:: 3.0.0 - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write + `__ + for more details. - .. deprecated:: 3.0.0 indicator : bool or str, default False If True, adds a column to the output DataFrame called "_merge" with information on the source of each row. The column can be given a different diff --git a/pandas/core/series.py b/pandas/core/series.py index 35f58a310ce9f..1ea8bbbaa0cfb 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -4130,20 +4130,18 @@ def swaplevel( ---------- i, j : int or str Levels of the indices to be swapped. Can pass level name as string. - copy : bool, default True - Whether to copy underlying data. + copy : bool, default False + This keyword is now ignored; changing its value will have no + impact on the method. - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write - `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy - and ignore the `copy` keyword. The `copy` keyword will be - removed in a future version of pandas. + .. deprecated:: 3.0.0 - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write + `__ + for more details. Returns ------- @@ -5058,21 +5056,18 @@ def rename( axis : {0 or 'index'} Unused. Parameter needed for compatibility with DataFrame. copy : bool, default False - Also copy underlying data. + This keyword is now ignored; changing its value will have no + impact on the method. - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write - `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy and - ignore the `copy` keyword. The `copy` keyword will be removed in a - future version of pandas. + .. deprecated:: 3.0.0 - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write + `__ + for more details. - .. deprecated:: 3.0.0 inplace : bool, default False Whether to return a new Series. If True the value of copy is ignored. level : int or level name, default None @@ -5211,21 +5206,18 @@ def reindex( # type: ignore[override] * nearest: Use nearest valid observations to fill gap. copy : bool, default False - Return a new object, even if the passed indexes are the same. + This keyword is now ignored; changing its value will have no + impact on the method. - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write - `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy and - ignore the `copy` keyword. The `copy` keyword will be removed in a - future version of pandas. + .. deprecated:: 3.0.0 - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write + `__ + for more details. - .. deprecated:: 3.0.0 level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level. @@ -5471,19 +5463,18 @@ def rename_axis( axis : {0 or 'index'}, default 0 The axis to rename. For `Series` this parameter is unused and defaults to 0. copy : bool, default False - Also copy underlying data. + This keyword is now ignored; changing its value will have no + impact on the method. - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write + .. deprecated:: 3.0.0 + + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy and - ignore the `copy` keyword. The `copy` keyword will be removed in a - future version of pandas. + for more details. - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` inplace : bool, default False Modifies the object directly, instead of creating a new Series or DataFrame. @@ -6459,22 +6450,18 @@ def to_timestamp( Convention for converting period to timestamp; start of period vs. end. copy : bool, default False - Whether or not to return a copy. - - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write - `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy and - ignore the `copy` keyword. The `copy` keyword will be removed in a - future version of pandas. - - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` + This keyword is now ignored; changing its value will have no + impact on the method. .. deprecated:: 3.0.0 + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write + `__ + for more details. + Returns ------- Series with DatetimeIndex @@ -6536,22 +6523,18 @@ def to_period( freq : str, default None Frequency associated with the PeriodIndex. copy : bool, default False - Whether or not to return a copy. - - .. note:: - The `copy` keyword will change behavior in pandas 3.0. - `Copy-on-Write - `__ - will be enabled by default, which means that all methods with a - `copy` keyword will use a lazy copy mechanism to defer the copy and - ignore the `copy` keyword. The `copy` keyword will be removed in a - future version of pandas. - - You can already get the future behavior and improvements through - enabling copy on write ``pd.options.mode.copy_on_write = True`` + This keyword is now ignored; changing its value will have no + impact on the method. .. deprecated:: 3.0.0 + This keyword is ignored and will be removed in pandas 4.0. Since + pandas 3.0, this method always returns a new object using a lazy + copy mechanism that defers copies until necessary + (Copy-on-Write). See the `user guide on Copy-on-Write + `__ + for more details. + Returns ------- Series