Skip to content

Commit dbebfec

Browse files
author
maxime.song
committed
DOC: fix code example about generic indexing in user guide
1 parent 42a6d44 commit dbebfec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/source/user_guide/cookbook.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@ There are 2 explicit slicing methods, with a third general case
219219
df.loc['bar':'kar'] # Label
220220
221221
# Generic
222-
df.iloc[0:3]
223-
df.loc['bar':'kar']
222+
df[0:3]
223+
df['bar':'kar']
224224
225225
Ambiguity arises when an index consists of integers with a non-zero start or non-unit increment.
226226

0 commit comments

Comments
 (0)