English subtitles

← Dataframe -- Average Gold Medal - Intro to Data Science

Get Embed Code
6 Languages

Showing Revision 9 created 05/24/2016 by Udacity Robot.

  1. All right, why don't we walk through the solution.
  2. First we define these Python lists called countries, gold, silver, and
  3. bronze, which give us ordered lists of the country names, gold medal counts,
  4. silver medal counts, and
  5. bronze medal counts as they appear in the Sochi medal count table.
  6. Then we create this Python dictionary, Olympic medal counts.
  7. Where the keys are our column names and
  8. the values are panda series containing these lists.
  9. Finally, we create our data frame Olympic_medal_counts_df by
  10. passing olympic_medal_counts into the DataFrame function.