From the course: Data Cleaning in Python Essential Training

Unlock this course with a free trial

Join today to access over 25,400 courses taught by industry experts.

Subgroups

Subgroups

- [Instructor] Say you want to measure student heights. Let's have a look at the data. We have a csv with the name, grade, and the height. Let's load it. It does start from here. So we import pandas and reading the csv. And I'm going to hide the left column. And we see Adam, Beth, Chris, and Dana. If you'd like to validate the height, you can go over, for example, to Wikipedia, and find out that the tallest person alive was 107.1 inches. Looking at all the heights, they seem okay. However, Beth seems like awfully tall for a first grader. You do some research and find out that first grade height are up to 32 inches. So first, create data frame with the maximal heights. We're going to do just a single row for the first grade, so first and 32. And now we are going to merge the data frame with the values with the data frame of the maximal heights with the left join. When we run the cell, now we are going to get the name,…

Contents