Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Lets count the total number of countries present in our data
- print('There are a total number of {} countries in our data'.format(len(data.country.unique())))
- # Let's count the number of billioniares across countries
- nations_count = data.country.value_counts().head(20)
- nations_count['Other countries'] = data.country.value_counts()[21:].sum()
- display(nations_count.head())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement