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 - 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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Introduction to pandas1m 30s
-
(Locked)
Create sample data3m 50s
-
(Locked)
Load sample data2m 17s
-
(Locked)
Basic operations1m 57s
-
(Locked)
Simplify with slicing4m 12s
-
(Locked)
Filter and clean data5m 39s
-
(Locked)
Rename and delete columns3m 16s
-
(Locked)
Aggregate functions2m 39s
-
(Locked)
Identify missing data3m 41s
-
(Locked)
Remove or fill in missing data5m 3s
-
(Locked)
Convert pandas DataFrames1m 15s
-
(Locked)
Export pandas DataFrames1m 28s
-
(Locked)
-
-
-