Skip to content

Commit

Permalink
Fix NameError in 'Evaluation order matters' (pandas-dev#55198)
Browse files Browse the repository at this point in the history
* 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.'
  • Loading branch information
sergei3000 authored Sep 19, 2023
1 parent f1bf7d4 commit 6d58277
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/source/user_guide/indexing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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::
Expand Down

0 comments on commit 6d58277

Please sign in to comment.