Files

10 lines
766 B
Markdown
Raw Permalink Normal View History

2026-06-15 15:26:18 +02:00
# Indexing & Slicing
2026-06-16 13:12:17 +02:00
Pandas provides two primary indexing systems: `.loc[]` for label-based selection and `.iloc[]` for position-based selection. Both work on rows, columns, or both simultaneously. Boolean indexing with a condition (e.g., `df[df['age'] > 30]`) is the most common way to filter rows.
Visit the following resources to learn more:
- [@official@pandas.DataFrame.loc](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.loc.html)
- [@official@pandas.DataFrame.iloc](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.iloc.html)
- [@article@Iloc vs Loc in Pandas: A Guide with Examples](https://www.analyticsvidhya.com/blog/2026/03/iloc-vs-loc-in-pandas/)
- [@video@Pandas loc and iloc](https://www.youtube.com/watch?v=naRQyRZrXCE)