Kaggle / Kaggle/learntools

Typo in pandas tutorial 1?

Open
#287 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
514
Forks
274
PR merge metrics
No merged PRs in 30d

Description

Hey, I was just going through the pandas tutorial and wasn't sure whether this is a typo or if I'm misunderstanding.

https://github.com/Kaggle/learntools/blob/886f5c215de079287f21e2d3a92bd852fb95d105/notebooks/pandas/raw/tut_1.ipynb#L279

> it's a lot more convenient to index `df.loc['Apples':'Potatoes']` than it is to index something like `df.loc['Apples', 'Potatoet]` (`t` coming after `s` 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]`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.