Join Jonathan Fernandes for an in-depth discussion in this video Final solution, part of pandas Essential Training.
(swooshing cymbals)…- [Instructor] So this is an interesting question…that has a lot of moving parts.…I'm going to show you one of the ways to solve it.…In every Olympics, which US athlete has won…the most total number of medals?…Include the athlete's discipline.…So, again, we're interested in…only the athletes from the USA…so we use our dataframe and we say, oo.NOC equals USA,…and let's store that in the variable,…which is our dataframe, gy.…
Now, given that we want to determine the values…for every Olympics, we will need to group by…the Edition, the Athlete, the Medal.…So, if I do a groupby on the gy dataframe…on the Edition, the Athlete, and the Medal,…and I do a sizeof there, I can see that I've got…the Edition, the Athlete, and the Medals.…
So, I want to do an unstack,…and the reason I want to do an unstack is because,…then, I'm in a position to have three different columns,…Silver, Gold, and Bronze,…and then I can add those three columns…to get the total number of medals.…So, I do an unstack of the Medal.…I'll do a fill_value equal zero, and run that.…
- 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.