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] So, remember to run the first couple of lines, so we want to import Pandas as PD, so I run that by hitting shift and enter. I want to load the CSV file into my DataFrame called 00 and so, the first question is list our Olympics DataFrame. Now, since our DataFrame is called 00, all we need to do type 00 and run that cell and we can see that we've got the entire DataFrame here. The next question is to list only the NOC column using both the square bracket notation and the dot notation. So, 00 is my DataFrame and the NOC column is NOC in all capitals and I can run that and you can see that this is displayed in the way that we expect. So, the first country's Hungary and so on. And if I want to do the same thing but with the dot notation, I type 00 which is my DataFrame and then the series name which is NOC. And I get exactly the same results as I did above. Now, the final question is to determine what type this object is, so all we need to do is call the type function, so…
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.