Join Jonathan Fernandes for an in-depth discussion in this video Solution, part of pandas Essential Training.
- [Instructor] So, let's get started…on the challenge for chapter six which is indexing.…So, let's import Pandas,…let's read the Olympic CSV file into our DataFrame…called 00, so plot the total number…of medals awarded at each of the Olympic Games…throughout history, so since we want…the number of medals throughout history,…let's use the edition, so 00.Edition…which is the series in the 00 DataFrame…and let's use value_counts.…
And if we plot that,…we don't seem to have a plot that we expected,…so what seems to be wrong here?…Well, let's take a few steps back…and look at the value_counts object.…Now, if I do a type here,…we can see that 00.Edition.value_counts…is in fact a Pandas series,…so what that means then…is that when I do a value_counts,…the first column is the index…and the second column are the values for that index,…so part of the reason that we had a problem…when plotting that graph…was this index is not sorted,…so what we can do then is to sort the index…of these value_Counts because remember,…this is a series,…
- 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.