題目會給定一個pandas DataFrame作為輸入,要求我們以原有的資料表name欄位為檢查基準,刪除有缺失值None的 data rows。
Example 1:
Input:
+------------+---------+-----+
| student_id | name | age |
+------------+---------+-----+
| 32 | Piper | 5 |
| 217 | None | 19 |
| 779 | Georgia | 20 |
| 849 | Willow | 14 |
+------------+---------+-----+
Output:
+------------+---------+-----+
| student_id | name | age |
+------------+---------+-----+
| 32 | Piper | 5 |
| 779 | Georgia | 20 |
| 849 | Willow | 14 |
+------------+---------+-----+
Explanation:
Student with id 217 havs empty value in the name column, so it will be removed.
這筆資料在name欄位有缺失值,所以最後從資料表中刪除掉。
| 217 | None | 19 |