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 of NaN values marked as True and the rest as False. This function is also used here as an additional function for Series.

Get hands-on with 1200+ tech skills courses.