From the course: Python for Data Visualization

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Remove or fill in missing data

Remove or fill in missing data - Python Tutorial

From the course: Python for Data Visualization

Remove or fill in missing data

- [Instructor] Once you've identified missing data, it's really important to either remove that data or fill in the missing data with a reasonable value. This is a really important subject, as before you can graph data, you need to make sure you aren't trying to graph some missing values, as that can cause an error or cause a misinterpretation of the data. We're working with the car loan dataset and the first thing we're going to do is we're going to utilize the info method. And what the info method does is it shows us how many missing values we have in each of our columns. And as you see, we have 60 non-null values for every column except for the interest paid column. This means that we have one null value. There are a couple different ways to deal with missing data. The first way is simply to remove the missing values. And in pandas you can remove the missing values by using the drop NA method. And what the code here…

Contents