From f009e6f4642a0c3a48b200b889b89dcc9b26f5c0 Mon Sep 17 00:00:00 2001 From: "maxime.song" Date: Wed, 8 Jul 2020 17:14:01 +0800 Subject: [PATCH] DOC: fix code snippets for generic indexing --- doc/source/user_guide/cookbook.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/user_guide/cookbook.rst b/doc/source/user_guide/cookbook.rst index 50b946999092a..49487ac327e73 100644 --- a/doc/source/user_guide/cookbook.rst +++ b/doc/source/user_guide/cookbook.rst @@ -219,8 +219,8 @@ There are 2 explicit slicing methods, with a third general case df.loc['bar':'kar'] # Label # Generic - df.iloc[0:3] - df.loc['bar':'kar'] + df[0:3] + df['bar':'kar'] Ambiguity arises when an index consists of integers with a non-zero start or non-unit increment.