Skip to content

Commit 6d58277

Browse files
authored
Fix NameError in 'Evaluation order matters' (#55198)
* Fix NameError in 'Evaluation order matters' This code in 'Indexing and selecting data' of doc wouldn't execute * Update indexing.rst Another 'optiion_context' without 'pd.'
1 parent f1bf7d4 commit 6d58277

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/source/user_guide/indexing.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1837,7 +1837,7 @@ This however is operating on a copy and will not work.
18371837
:okwarning:
18381838
:okexcept:
18391839
1840-
with option_context('mode.chained_assignment','warn'):
1840+
with pd.option_context('mode.chained_assignment','warn'):
18411841
dfb[dfb['a'].str.startswith('o')]['c'] = 42
18421842
18431843
A chained assignment can also crop up in setting in a mixed dtype frame.
@@ -1879,7 +1879,7 @@ Last, the subsequent example will **not** work at all, and so should be avoided:
18791879
:okwarning:
18801880
:okexcept:
18811881
1882-
with option_context('mode.chained_assignment','raise'):
1882+
with pd.option_context('mode.chained_assignment','raise'):
18831883
dfd.loc[0]['a'] = 1111
18841884
18851885
.. warning::

0 commit comments

Comments
 (0)