From the course: Data Cleaning in Python Essential Training
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Filling missing values - Python Tutorial
From the course: Data Cleaning in Python Essential Training
Filling missing values
- [Instructor] In some cases you would like to fill out missing values by some heuristic. Let's say we have some shopping information. We have the date, the name of the item being bought, the amount and the price. And you can see that in some cases we are missing the amount, in some the date, and in some the name. First, let's load the data frame and have a look at it. And we see that we have a data frame. Here we are missing the time in the name column. We have a missing name here on the last one. In the amount, row two, we have a missing amount in the price. We have a missing price. Let's start with the amount. We're going to fill one where the amount is missing. So, we're are going to use Panda's fill N A method. Which has a lot of options. First, we fill it with a fixed value Saying in place, equal true meaning we want to change the current data frame, not generate a new one. And if you run this one, and…