Session Ready
Exercise

Plotting influence of host country

This final exercise starts off with the DataFrames influence and editions in the namespace. Your job is to plot the influence of being a host country.

Instructions
100 XP
  • Create a Series called change by extracting the 'Change' column from influence.
  • Create a bar plot of change using the .plot() method with kind='bar'. Save the result as ax to permit further customization.
  • Customize the bar plot of change to improve readability:
  • Apply the method .set_ylabel("% Change of Host Country Medal Count") toax.
  • Apply the method .set_title("Is there a Host Country Advantage?") to ax.
  • Apply the method .set_xticklabels(editions['City']) to ax.
  • Reveal the final plot using plt.show().