SHARE
TWEET

Untitled

a guest Oct 17th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. country_worth = data[data.country.isin(selected_countries)][['country','worth']]
  2. country_worth = country_worth.groupby('country').median()
  3.  
  4. # we visualize the average(median) worth in each country and compare which on has the highest
  5. # or the least
  6. with plt.style.context('fivethirtyeight'):
  7.     country_worth.plot(kind='barh',figsize=(10,6),color='purple',alpha=.8)
  8.     plt.title('Average worth of Forbes 2018 world\nbillioniares across countries.',
  9.               fontsize=15)
  10.     plt.xlabel('worth (millions of US dollars)',fontsize=13)
  11.     plt.ylabel('country',fontsize=13)
  12.     plt.legend(labels=[])
  13.     plt.grid(axis='x')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top