From 6521a88fe4077381b01c4f68c8fc7514d56668a7 Mon Sep 17 00:00:00 2001 From: Sergey Zakharov Date: Tue, 19 Sep 2023 14:30:05 +0400 Subject: [PATCH 1/2] Fix NameError in 'Evaluation order matters' This code in 'Indexing and selecting data' of doc wouldn't execute --- doc/source/user_guide/indexing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/user_guide/indexing.rst b/doc/source/user_guide/indexing.rst index 52bc43f52b1d3..62ea1f403eb4e 100644 --- a/doc/source/user_guide/indexing.rst +++ b/doc/source/user_guide/indexing.rst @@ -1837,7 +1837,7 @@ This however is operating on a copy and will not work. :okwarning: :okexcept: - with option_context('mode.chained_assignment','warn'): + with pd.option_context('mode.chained_assignment','warn'): dfb[dfb['a'].str.startswith('o')]['c'] = 42 A chained assignment can also crop up in setting in a mixed dtype frame. From 5d2c94c0f333828015b0e41aa4c2b9b670036f19 Mon Sep 17 00:00:00 2001 From: Sergey Zakharov Date: Tue, 19 Sep 2023 20:11:46 +0400 Subject: [PATCH 2/2] Update indexing.rst Another 'optiion_context' without 'pd.' --- doc/source/user_guide/indexing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/user_guide/indexing.rst b/doc/source/user_guide/indexing.rst index 62ea1f403eb4e..7541cf3c8af3c 100644 --- a/doc/source/user_guide/indexing.rst +++ b/doc/source/user_guide/indexing.rst @@ -1879,7 +1879,7 @@ Last, the subsequent example will **not** work at all, and so should be avoided: :okwarning: :okexcept: - with option_context('mode.chained_assignment','raise'): + with pd.option_context('mode.chained_assignment','raise'): dfd.loc[0]['a'] = 1111 .. warning::