Cleaning DataLesson 10Free preview
Cleaning Empty Cells
This lesson is part of Pandas · All levels
Summary
A blank cell can be dealt with in three main ways: leave it, delete the row, or fill with a replacement value. The panda offers the dropna to remove the row and the fillna to fill the value, for example the average or median of the column. The choice of method depends on the amount of data that is lost and the context of the analysis.
Key points
- Empty cells are usually NaN or None on the DataFrame
- Dropna delete blank rows or columns
- Fillna fills the empty value with a certain value
- Substitute values are generally averages, medians, or modes
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.