Class 7 · CBSE AI · Strand B — Python for AI
Reading a CSV with pandas — your first data file in Python
CSV is the most common data format, and pandas reads it in one line. The start of data science. For Class 7.
Class 7 · CBSE AI · Strand B — Python for AI
CSV is the most common data format, and pandas reads it in one line. The start of data science. For Class 7.
Mandi (wholesale market) inventory ledger
A CSV is like the ledger a mandi trader keeps — rows of items, columns for weight, price, and supplier. pandas is the accountant who can read that ledger instantly and tell you the total, the average price, and the most expensive item without you counting anything by hand.
Doctor reviewing a patient file
Before treating a patient, a doctor skims the file: name, age, existing conditions, last visit. df.head() is that first skim. df.describe() is the doctor asking: 'On average, how are patients in this ward doing?' Both are needed before any diagnosis.
Every Dhee Learning session for this concept follows three stages. We share the questions Dhee actually asks, so you can hear what a session sounds like.
Stage 1 — Surface
Before you can train an AI model, you need data. If someone gives you a spreadsheet with 5,000 rows of student records, what is the first thing you would want to know about it before doing anything else?
Rote answer
"I would load it into pandas"
Understood
"I would want to know how many rows and columns there are, what each column means, whether there are missing values, and what types of data are in each column — before writing a single line of analysis"
Stage 2 — Reasoning
pandas gives you df.head() and df.describe(). What different questions does each one answer, and why would you need both?
Follow-up Dhee may use: If describe() shows a maximum age of 150 in a student dataset, what does that tell you — and what would you do next?
Stage 3 — Application
Load a CSV of your choice into a Colab notebook. Using only four commands — read_csv, head(), shape, and describe() — tell me three things you have learned about the dataset that you did not know before loading it.
Misconception Dhee watches for: Treating df.describe() output as the definitive truth about the data rather than a starting point for questions
Dhee turns this concept into a 15-minute spoken session — asking, listening, and probing — so your child builds the idea themselves.
CSV is the most common data format, and pandas reads it in one line. The start of data science. For Class 7.
pandas reads all data as the correct type automatically — in reality, dates often load as strings and numbers as objects if the CSV has formatting issues
Dhee opens with a question — for example: "Before you can train an AI model, you need data. If someone gives you a spreadsheet with 5,000 rows of student records, what is the first thing you would want to know about it before doing anything else?" — listens to your child's answer, then probes the reasoning behind it. The session ends when the child can apply the idea to a brand-new situation, not just recall it.