Join Jonathan Fernandes for an in-depth discussion in this video Solution, part of pandas Essential Training.
- [Instructor] Okay, so let's get started…on the stack and unstack challenge questions…and remember that this is just the way I'm going to solve them.…There are multiple ways of solving these problems.…So, let's import pandas as pd.…Root in the data into our data frame.…Now, we want to plot the number of gold medals…won by USA male and female athletes…throughout the history of the Olympics.…So, the first thing we want to do…is to determine which athletes are from the USA…so, oo.NOC…equals USA…and because we're going to have more than one condition…we include the conditions in parentheses…and we want the athletes that have won a gold medal…so, oo.Medal equals Gold.…
And let's store that in the data frame gu for gold.…And let's confirm that this data frame…has the information we want.…So, the athletes are all from the USA,…we can see that in terms of gender…there's both male and female athletes.…All of them have won gold medals…and so we're good to go.…Now the next thing is…because we are looking for…athletes across the history of the Olympics…
- Working with plots
- Boolean indexing
- String handling
- Grouping data
- Creating your own colormaps
Skill Level Intermediate
1. Technical Setup
2. Series and DataFrames
3. Data Input and Validation
4. Basic Analysis
5. Basic Plotting
9. Data Visualizations
Next steps1m 1s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.