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.