head()Look at the first rows.
Session 2
Loading • Inspecting • Filtering
• Asking questions
Bloomberg × Asian College of Journalism
Quick check-in
Sometimes Python installs successfully but pip isn't available.
Pandas is less about memorising commands and more about recognising patterns.
Every command starts with df because that's where the dataset lives.
head()Look at the first rows.
tail()See the end of the table.
shapeCount rows and columns.
info()Check types and missing data.
Filtering is simply creating a True/False checklist and keeping the rows marked True.
Wrong column name.
Python doesn't recognise the name. Usually missing quotes or variable.
Check brackets. Quotes. Parentheses.
Your code worked. No rows matched the condition.