pandas · Lesson 2.2 · Pro
loc and iloc
Pick rows and columns by label with loc, or by position with iloc.
In this lesson
- iloc: by position
- loc: by label
- A meaningful index
- Rows with a condition, chosen columns
Go Pro to read this lesson
Pro unlocks every lesson and practice problem in SQL, Python, pandas and NumPy, with answers and step-by-step explanations.