Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. # Lets count the total number of countries present in our data
  2. print('There are a total number of {} countries in our data'.format(len(data.country.unique())))
  3.  
  4. # Let's count the number of billioniares across countries
  5. nations_count = data.country.value_counts().head(20)
  6. nations_count['Other countries'] = data.country.value_counts()[21:].sum()
  7. display(nations_count.head())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement