Open
Description
Hey, I was just going through the pandas tutorial and wasn't sure whether this is a typo or if I'm misunderstanding.
learntools/notebooks/pandas/raw/tut_1.ipynb
Line 279 in 886f5c2
it's a lot more convenient to index
df.loc['Apples':'Potatoes']
than it is to index something likedf.loc['Apples', 'Potatoet]
(t
coming afters
in the alphabet)
Should the second code snippet be df.iloc['Apples':'Potatoes']
? It was just explained that df.iloc[0:10]
gives you indices 0,...,9
but df.loc[0:10]
gives you indices 0,...,10
; and then I wasn't sure how they got df.loc['Apples', 'Potatoet]
.
Metadata
Metadata
Assignees
Labels
No labels