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

Solution - pandas Tutorial

From the course: pandas Essential Training

Start my 1-month free trial

Solution

- [Instructor] Onto the basic plotting challenge. So, we've imported Pandas. The next thing we're going to have to do is to import matplotlib. So, pyplot as plt and we want to be able to see the plots in our Jupyter Notebook. We'll also want to import seaborn as sns. Let me just run all of these cells again. Right, onto the first question. Plot the number of medals achieved by the Chinese team, that's the men and women, in Beijing 2008 using matplotlib and seaborn. So, in Pandas, we want to be able to identify the men and women who have participated from team China in the Beijing Olympics which is in 2008. So, 00 for the DataFrame, 00.Edition and we're looking for 2008 and remember that because we are going to be having multiple conditions, we need to enclose them in brackets and we're looking for team China. We get that information from the series NOC, so 00.NOC equals CHN. Now, I'm going to assign this to the DataFrame men and women, so mw and let's just check and make sure that…

Contents