KwickClips Python · 43 sec · free
What does dropna() remove?
Short answer. Every row that has at least one missing value.
Why is the mean often a better fill than 0?
Zero wrongly suggests the student scored nothing.
Two tools
| Method | What it does |
|---|---|
| dropna() | removes rows |
| fillna(0) | puts in 0 |
| fillna(mean) | puts average |
Remember
| dropna() removes gaps |
| fillna() fills them |
Found missing values? You have two tools. Here are the two tools. Drop N A removes rows with gaps. Fill N A zero puts in zero. Fill N A with the mean puts in the average. Two rules. Drop N A removes gaps. Fill N A fills them.
This clip is from the full lesson: Handling Missing Values in Pandas — 7 minutes, with the tables, the quick answers and the whole lesson in text.
Useful for: CBSE Class 12 Artificial Intelligence (843)
More KwickClips from this lesson
What does NaN stand for?41 sec
Why can't you use == to find NaN?45 sec
When should you drop a whole column?43 secVoice-over is AI-generated; the script is written and checked by Kajal Ma'am. Confirm anything you plan around against your official board document. We never ask for a password or an OTP.

