Meet a tiny table
Scenario
You are a data scientist. The clinic has a tiny table. Each row is one patient visit. Each column tells us one thing about that visit.
Question
Show the first rows so we can look at the table before doing any calculations.
Your task
- import pandas gives Python a tool for working with tables
- df is the short name of our table
- head() shows the first few rows
Beginner · Data Filtering & Record Counting — question 2 of 30
1. Choose your dataset
Pick an industry and a size. Your code and results change to match.
Meet a tiny table
Show the first rows so we can look at the table before doing any calculations.
Your code cell is below. Press Check my answer to run the cell — the result appears as Out [1].
💡 Explain my whole code, line by line (hover any word in the editor for a tip)
🌈 In short — no coding words
Altogether: this script runs top to bottom, one line at a time, building up the answer step by step.
Dataset & schema
clinic_visits
The tiny starter data. Bigger data scrolls.
Fields
| patient_id | age | wait_minutes |
|---|---|---|
| P-01 | 8 | 12 |
| P-02 | 42 | 35 |
| P-03 | 67 | 18 |
patient_id, age and wait_minutes are columns. Each horizontal line is a row.
$ Press “Check my answer” — results appear here.Your next steps
Each item turns green when your answer includes it.
- Opens the table tool
- Reads the clinic table
- Shows the first rows