Lesson 21 of 60
pythonSelecting & Filtering Data in Pandas
20 minutes
Course progress35%
Selecting & Filtering Data
Pandas provides expressive syntax for subsetting.
Selecting rows by label with .loc
df.loc[10:20] # rows with index 10‑20 inclusive
Selecting rows by integer location with .iloc
df.iloc[:3]