Skip to content

Commit 8cbac01

Browse files
committed
Fix links
1 parent 8ea42c4 commit 8cbac01

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

doc/source/user_guide/copy_on_write.rst

+10
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
Copy-on-Write (CoW)
77
*******************
88

9+
.. note::
10+
11+
Copy-on-Write will become the default in pandas 3.0 We recommend
12+
:ref:`turning it on now <copy_on_write_enabling>`
13+
to benefit from all improvements.
14+
915
Copy-on-Write was first introduced in version 1.5.0. Starting from version 2.0 most of the
1016
optimizations that become possible through CoW are implemented and supported. All possible
1117
optimizations are supported starting from pandas 2.1.
@@ -123,6 +129,8 @@ CoW triggers a copy when ``df`` is changed to avoid mutating ``view`` as well:
123129
df
124130
view
125131
132+
.. _copy_on_write_chained_assignment:
133+
126134
Chained Assignment
127135
------------------
128136

@@ -238,6 +246,8 @@ and :meth:`DataFrame.rename`.
238246
These methods return views when Copy-on-Write is enabled, which provides a significant
239247
performance improvement compared to the regular execution.
240248

249+
.. _copy_on_write_enabling:
250+
241251
How to enable CoW
242252
-----------------
243253

doc/source/user_guide/indexing.rst

+6-9
Original file line numberDiff line numberDiff line change
@@ -1729,12 +1729,11 @@ Returning a view versus a copy
17291729

17301730
.. warning::
17311731

1732-
`Copy-on-Write
1733-
<https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__.
1732+
:ref:`Copy-on-Write <copy_on_write>`
17341733
will become the new default in pandas 3.0. This means than chained indexing will
17351734
never work. As a consequence, the ``SettingWithCopyWarning`` won't be necessary
17361735
anymore.
1737-
See `this section <https://mathdatasimplified.com/2023/04/20/copy-on-write-mode-in-pandas-2-0/>`__
1736+
See :ref:`this section <copy_on_write_chained_assignment>`
17381737
for more context.
17391738
We recommend turning Copy-on-Write on to leverage the improvements with
17401739

@@ -1784,12 +1783,11 @@ Why does assignment fail when using chained indexing?
17841783

17851784
.. warning::
17861785

1787-
`Copy-on-Write
1788-
<https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__.
1786+
:ref:`Copy-on-Write <copy_on_write>`
17891787
will become the new default in pandas 3.0. This means than chained indexing will
17901788
never work. As a consequence, the ``SettingWithCopyWarning`` won't be necessary
17911789
anymore.
1792-
See `this section <https://mathdatasimplified.com/2023/04/20/copy-on-write-mode-in-pandas-2-0/>`__
1790+
See :ref:`this section <copy_on_write_chained_assignment>`
17931791
for more context.
17941792
We recommend turning Copy-on-Write on to leverage the improvements with
17951793

@@ -1857,12 +1855,11 @@ Evaluation order matters
18571855

18581856
.. warning::
18591857

1860-
`Copy-on-Write
1861-
<https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__.
1858+
:ref:`Copy-on-Write <copy_on_write>`
18621859
will become the new default in pandas 3.0. This means than chained indexing will
18631860
never work. As a consequence, the ``SettingWithCopyWarning`` won't be necessary
18641861
anymore.
1865-
See `this section <https://mathdatasimplified.com/2023/04/20/copy-on-write-mode-in-pandas-2-0/>`__
1862+
See :ref:`this section <copy_on_write_chained_assignment>`
18661863
for more context.
18671864
We recommend turning Copy-on-Write on to leverage the improvements with
18681865

0 commit comments

Comments
 (0)