🐼 [Pandas] Simple 1-Liner to Drop Missing Names (Perfect for Beginners!)
Cleaning Student Data - Dropping Missing NamesIntuition 🧠:
When we have student data with missing information, we need to clean it up. Just like a teacher would
# Cleaning Student Data - Dropping Missing Names

**Intuition** 🧠:  
When we have student data with missing information, we need to clean it up. Just like a teacher wouldn't allow a test without a name, we shouldn't keep rows where the student's name is missing!

**Approach** ✂️:  
We'll use pandas' `dropna()` function which works like an eraser for missing data. We'll specifically target the "name" column and remove any rows where the name is blank or NaN (Not a Number).

**Complexity** ⏳:  
- **Time**: O(n) - We check each student's name once (like reading down a class list)
- **Space**: O(n) - We might need to store all the good data separately (like making a new attendance sheet)

**Code** 💻:
```python
import pandas as pd

def dropMissingData(students: pd.DataFrame) -> pd.DataFrame:
    # Keep only rows where the 'name' column has real values
    return students.dropna(subset=['name'])
```

**How It Works** 🔍:
1. `students` is our class roster (a pandas DataFrame)
2. `dropna()` is our "eraser" that removes missing data
3. `subset=['name']` tells it to only check the name column
4. It returns a clean roster with no nameless students!

**Example** 📚:
Original Data:
```
   student_id   name  age
0          1   John   20
1          2   None   21  # <-- This row will disappear!
2          3   Anna   19
```

After Cleaning:
```
   student_id  name  age
0          1  John   20
2          3  Anna   19
```

Now our data is clean and ready for use! 🎉

Follow me on linkedin, twitter-

[Linkedin](linkedin.com/in/eatandcode)
[Twitter](x.com/eatandcode)
['Pandas']