Preparing data
The Chillai Kalan log is a mess: a day written twice, a day left blank, "lots" instead of a number, dates all jumbled. You can't chart that — yet.
- Clean a messy log in four steps
- Mark missing data — never make it up
- Find which month was wetter
Preparing data
The Chillai Kalan log is a mess: a day written twice, a day left blank, "lots" instead of a number, dates all jumbled. You can't chart that — yet.
- Clean a messy log in four steps
- Mark missing data — never make it up
- Find which month was wetter
Story
Learn it
A messy log makes a misleading chart, and a model trained on it learns the wrong lesson. So data scientists spend much of their time preparing data before anything else. In Class 6 you spotted problems; this year you fix them, in four steps, without ever making a number up.
Words to know
(or cleaning) — fixing a dataset so it is ready to chart or to train a model.
the same record entered twice. It gets counted twice.
a wrong value, like "lots" where a number should be.
an empty cell where a value should be.
arrange records in order: by date, size or name.
collect related records together, such as by month, so patterns appear.
Step by step: four steps on a short log
| Date | Rain (mm) |
|---|---|
| 5 Jan | 4 |
| 2 Jan | lots |
| 3 Jan | 6 |
| 3 Jan | 6 |
| 4 Jan | (empty) |
- First, save a copy of the original. Always.
- Remove errors and duplicates: 3 January appears twice, so delete one. "lots" is not a number and you cannot know the real one, so empty the cell.
- Missing values: write missing beside 2 and 4 January. If a trusted weather station gives the 4 January value, type it and note from station. Never invent one.
- Arrange in order: sort by date: 2, 3, 4, 5 January.
- Group: total each week or month with
SUM. Now the pattern can show.
Why each step matters: a duplicate adds the same rain twice; a wrong value breaks the sum; a jumbled order hides the trend; ungrouped data is too fine to see.
Careful: sort the whole table, never one column alone. Sorting only the dates scrambles the rows, and every rainfall number ends up beside the wrong day. And deleting a duplicate does not lose data: it removes a copy, not a day.
Your missions
unit-4/rain-log-messy.odsErrors and duplicates
pairs6 min- 1
Open
rain-log-messy.odsand save a copy at once asrain-log-clean.ods. Always keep the original. - 2
Predict: which month was wetter — December or January? Note it.
Only you can see this - 3
Find
lotsin Rain/Snow (mm). You can't know the real number — delete the word, leave the cell empty. - 4
Select the data, Data → More Filters → Standard Filter:
Date = Not Empty, tick Options → No duplications, Copy results toF1. Use the new copy.
Missing values and order
pairs5 min- 5
Type
missingin Note beside each empty cell. For 10 January only, your teacher gives the weather-station value — type it and notefrom station. - 6
Data → Sort by Date, ascending.
Group and answer
pairs5 min- 7
Add a Month column (
DecorJan). Under the data:December totalandJanuary totalwithSUM. - 8
One sentence: which month was wetter, and does a missing value make you less sure? Save.
No laptop today?
Your teacher writes the 12-row messy log on the board. In pairs, rewrite it cleanly: cross out the duplicate, mark the missing values, put the dates in order, and total each month.
Debate it
For 10 January, one student suggests: "Just type 0. Nobody came to school, so nothing fell." Is that honest? What might a weather AI learn from it?
Check yourself · practice, not a test
In the app, students answer these one at a time and each answer is checked straight away. It's practice, never a mark — anything they miss comes back later for another go.
1.Put CBSE's steps for preparing data in order:
- 1Arrange data in order
- 2Fill missing values
- 3Group related items
- 4Remove errors or duplicates
2.A value is missing and you don't know it. The most honest thing is to:
- AType 0
- BType the biggest number in the column
- CMark it as missing, or fill it from a trusted source and note that
- DDelete the whole dataset
3.If the same day appears twice, its rain will be counted twice in the total.
TrueFalse4.Before you start cleaning, always save a ______ of the original file.
Clean, fill honestly, sort, group. Then chart.
Typing practice
8 minutes on typing.com: sentences with numbers.
- Term 2 lessons, then type these dates exactly:
2026-01-03,2026-01-10,2026-01-17,2026-01-24. - Use the number row, not the number pad, so both hands stay near home row.
- 2026-01-03
- 2026-01-10
- 2026-01-17
- 2026-01-24
Written and designed by Faizan Ayoub. © 2026 Faizan Ayoub. All rights reserved.