diff --git a/pandas/core/generic.py b/pandas/core/generic.py index ea133e9a83adb..955ccf1492fa0 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -6354,23 +6354,18 @@ def astype( a numpy.dtype or Python type to cast one or more of the DataFrame's columns to column-specific types. copy : bool, default False - Return a copy when ``copy=True`` (be very careful setting - ``copy=False`` as changes to values then may propagate to other - pandas objects). + 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 errors : {'raise', 'ignore'}, default 'raise' Control raising of exceptions on invalid data for provided dtype.