Replacing the Missing Values
Explore how to handle missing data by replacing missing values using the Pandas fillna function. Learn to use parameters for different replacement strategies such as filling with averages, forward fill, backward fill, and limiting the replacements. Understand when and how to apply these methods effectively to clean data.
We'll cover the following...
We'll cover the following...
The fillna function
In the previous lesson, we saw how to drop rows and columns that contain missing values. Dropping may not be the best option in many cases, though. Another option for handling missing values is to replace them with an actual value with the fillna function.
The value to be used as a replacement for missing values depend on the characteristics of the data. We may choose to replace missing values with the average ...