From the course: pandas Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Solution
- [Instructor] Right, now let's work through these solutions together. So the first thing we want to do is import Pandas as pd, and let's have an overview of our data set. First question is, in which events did Jesse Owens win a medal? Now, the first thing to be aware of is that in the Athletes field, the names are such that it's first the surname, which is in capitals, and then the first name. So we need to be aware of that when querying our data frame. In which events did Jesse Owens win a medal? So if we look at our data frame, we can see that the athlete names are such that the surname is first in capitals and then the first name. So we need to be aware of that when querying our data frame. So I can enter OO dot athlete equals, and then, because his surname is Owens, Owens, Jesse, and if I hit Enter here, I'm going to get a whole load of trues and falses. So I encapsulate that in square brackets. And I can see that these are the rows corresponding to Jesse Owens. If I assign the…
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.