Dealing with Missing and Duplicated Data
Learn how to find missing and duplicated data in a DataFrame.
We'll cover the following...
We'll cover the following...
If we need to do an analysis or create machine learning models on our data, we must make sure that our data is complete before we start to report on it. Also, many machine learning models will fail to train if we try to train them on DataFrames with missing values.
We’re going to jump back to the presidential data again.
Missing data
Determining where data is missing involves the same methods as we saw in a Series. We just need to remember that a DataFrame has an extra dimension. The DataFrame has an .isna method that returns a DataFrame with true and false values indicating whether values are missing:
Because each ...