Dealing with Missing Data
In this lesson, how to deal with missing or "NaN" values in pandas is explained.
We'll cover the following
Missing data
Until now, we have encountered various scenarios where NaN
values were obtained and identified. This lesson focuses on removing or replacing these values based on the requirements. The ffill()
method is already discussed here; it deals with NaN
values resulting from reindexing. Some more additional functions on how to handle NaN
values are discussed below.
isnull()
: This function returns an object with all instances ofNaN
values marked asTrue
and the rest asFalse
. This function is also used here as an additional function forSeries
.
Get hands-on with 1200+ tech skills courses.