@@ -456,6 +456,18 @@ def set_flags(
456
456
----------
457
457
copy : bool, default False
458
458
Specify if a copy of the object should be made.
459
+
460
+ .. note::
461
+ The `copy` keyword will change behavior in pandas 3.0.
462
+ `Copy-on-Write
463
+ <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
464
+ will be enabled by default, which means that all methods with a
465
+ `copy` keyword will use a lazy copy mechanism to defer the copy and
466
+ ignore the `copy` keyword. The `copy` keyword will be removed in a
467
+ future version of pandas.
468
+
469
+ You can already get the future behavior and improvements through
470
+ enabling copy on write ``pd.options.mode.copy_on_write = True``
459
471
allows_duplicate_labels : bool, optional
460
472
Whether the returned object allows duplicate labels.
461
473
@@ -742,7 +754,17 @@ def set_axis(
742
754
copy : bool, default True
743
755
Whether to make a copy of the underlying data.
744
756
745
- .. versionadded:: 1.5.0
757
+ .. note::
758
+ The `copy` keyword will change behavior in pandas 3.0.
759
+ `Copy-on-Write
760
+ <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
761
+ will be enabled by default, which means that all methods with a
762
+ `copy` keyword will use a lazy copy mechanism to defer the copy and
763
+ ignore the `copy` keyword. The `copy` keyword will be removed in a
764
+ future version of pandas.
765
+
766
+ You can already get the future behavior and improvements through
767
+ enabling copy on write ``pd.options.mode.copy_on_write = True``
746
768
747
769
Returns
748
770
-------
@@ -1173,6 +1195,18 @@ def rename_axis(
1173
1195
The axis to rename. For `Series` this parameter is unused and defaults to 0.
1174
1196
copy : bool, default None
1175
1197
Also copy underlying data.
1198
+
1199
+ .. note::
1200
+ The `copy` keyword will change behavior in pandas 3.0.
1201
+ `Copy-on-Write
1202
+ <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
1203
+ will be enabled by default, which means that all methods with a
1204
+ `copy` keyword will use a lazy copy mechanism to defer the copy and
1205
+ ignore the `copy` keyword. The `copy` keyword will be removed in a
1206
+ future version of pandas.
1207
+
1208
+ You can already get the future behavior and improvements through
1209
+ enabling copy on write ``pd.options.mode.copy_on_write = True``
1176
1210
inplace : bool, default False
1177
1211
Modifies the object directly, instead of creating a new Series
1178
1212
or DataFrame.
@@ -4598,6 +4632,18 @@ def reindex_like(
4598
4632
4599
4633
copy : bool, default True
4600
4634
Return a new object, even if the passed indexes are the same.
4635
+
4636
+ .. note::
4637
+ The `copy` keyword will change behavior in pandas 3.0.
4638
+ `Copy-on-Write
4639
+ <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
4640
+ will be enabled by default, which means that all methods with a
4641
+ `copy` keyword will use a lazy copy mechanism to defer the copy and
4642
+ ignore the `copy` keyword. The `copy` keyword will be removed in a
4643
+ future version of pandas.
4644
+
4645
+ You can already get the future behavior and improvements through
4646
+ enabling copy on write ``pd.options.mode.copy_on_write = True``
4601
4647
limit : int, default None
4602
4648
Maximum number of consecutive labels to fill for inexact matches.
4603
4649
tolerance : optional
@@ -5344,6 +5390,18 @@ def reindex(
5344
5390
5345
5391
copy : bool, default True
5346
5392
Return a new object, even if the passed indexes are the same.
5393
+
5394
+ .. note::
5395
+ The `copy` keyword will change behavior in pandas 3.0.
5396
+ `Copy-on-Write
5397
+ <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
5398
+ will be enabled by default, which means that all methods with a
5399
+ `copy` keyword will use a lazy copy mechanism to defer the copy and
5400
+ ignore the `copy` keyword. The `copy` keyword will be removed in a
5401
+ future version of pandas.
5402
+
5403
+ You can already get the future behavior and improvements through
5404
+ enabling copy on write ``pd.options.mode.copy_on_write = True``
5347
5405
level : int or name
5348
5406
Broadcast across a level, matching Index values on the
5349
5407
passed MultiIndex level.
@@ -6776,6 +6834,18 @@ def infer_objects(self, copy: bool_t | None = None) -> Self:
6776
6834
Whether to make a copy for non-object or non-inferable columns
6777
6835
or Series.
6778
6836
6837
+ .. note::
6838
+ The `copy` keyword will change behavior in pandas 3.0.
6839
+ `Copy-on-Write
6840
+ <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
6841
+ will be enabled by default, which means that all methods with a
6842
+ `copy` keyword will use a lazy copy mechanism to defer the copy and
6843
+ ignore the `copy` keyword. The `copy` keyword will be removed in a
6844
+ future version of pandas.
6845
+
6846
+ You can already get the future behavior and improvements through
6847
+ enabling copy on write ``pd.options.mode.copy_on_write = True``
6848
+
6779
6849
Returns
6780
6850
-------
6781
6851
same type as input object
@@ -10113,6 +10183,18 @@ def align(
10113
10183
copy : bool, default True
10114
10184
Always returns new objects. If copy=False and no reindexing is
10115
10185
required then original objects are returned.
10186
+
10187
+ .. note::
10188
+ The `copy` keyword will change behavior in pandas 3.0.
10189
+ `Copy-on-Write
10190
+ <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
10191
+ will be enabled by default, which means that all methods with a
10192
+ `copy` keyword will use a lazy copy mechanism to defer the copy and
10193
+ ignore the `copy` keyword. The `copy` keyword will be removed in a
10194
+ future version of pandas.
10195
+
10196
+ You can already get the future behavior and improvements through
10197
+ enabling copy on write ``pd.options.mode.copy_on_write = True``
10116
10198
fill_value : scalar, default np.nan
10117
10199
Value to use for missing values. Defaults to NaN, but can be any
10118
10200
"compatible" value.
@@ -11161,6 +11243,18 @@ def truncate(
11161
11243
copy : bool, default is True,
11162
11244
Return a copy of the truncated section.
11163
11245
11246
+ .. note::
11247
+ The `copy` keyword will change behavior in pandas 3.0.
11248
+ `Copy-on-Write
11249
+ <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
11250
+ will be enabled by default, which means that all methods with a
11251
+ `copy` keyword will use a lazy copy mechanism to defer the copy and
11252
+ ignore the `copy` keyword. The `copy` keyword will be removed in a
11253
+ future version of pandas.
11254
+
11255
+ You can already get the future behavior and improvements through
11256
+ enabling copy on write ``pd.options.mode.copy_on_write = True``
11257
+
11164
11258
Returns
11165
11259
-------
11166
11260
type of caller
@@ -11317,6 +11411,18 @@ def tz_convert(
11317
11411
copy : bool, default True
11318
11412
Also make a copy of the underlying data.
11319
11413
11414
+ .. note::
11415
+ The `copy` keyword will change behavior in pandas 3.0.
11416
+ `Copy-on-Write
11417
+ <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
11418
+ will be enabled by default, which means that all methods with a
11419
+ `copy` keyword will use a lazy copy mechanism to defer the copy and
11420
+ ignore the `copy` keyword. The `copy` keyword will be removed in a
11421
+ future version of pandas.
11422
+
11423
+ You can already get the future behavior and improvements through
11424
+ enabling copy on write ``pd.options.mode.copy_on_write = True``
11425
+
11320
11426
Returns
11321
11427
-------
11322
11428
{klass}
@@ -11406,6 +11512,18 @@ def tz_localize(
11406
11512
must be None.
11407
11513
copy : bool, default True
11408
11514
Also make a copy of the underlying data.
11515
+
11516
+ .. note::
11517
+ The `copy` keyword will change behavior in pandas 3.0.
11518
+ `Copy-on-Write
11519
+ <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
11520
+ will be enabled by default, which means that all methods with a
11521
+ `copy` keyword will use a lazy copy mechanism to defer the copy and
11522
+ ignore the `copy` keyword. The `copy` keyword will be removed in a
11523
+ future version of pandas.
11524
+
11525
+ You can already get the future behavior and improvements through
11526
+ enabling copy on write ``pd.options.mode.copy_on_write = True``
11409
11527
ambiguous : 'infer', bool-ndarray, 'NaT', default 'raise'
11410
11528
When clocks moved backward due to DST, ambiguous times may arise.
11411
11529
For example in Central European Time (UTC+01), when going from
0 commit comments