Advertisement
Guest User

Untitled

a guest
May 21st, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. # Display the number of prizes won by male and female recipients.
  2. # ... YOUR CODE FOR TASK 2 ...
  3. gender = nobel.groupby('sex').year.count()
  4. print(gender)
  5.  
  6.  
  7.  
  8. # Display the number of prizes won by the top 10 nationalities.
  9. # ... YOUR CODE FOR TASK 2 ...
  10. countries = nobel.groupby('birth_country').year.count()
  11. top10 = countries.sort_values(ascending=False)
  12. print(top10[:10])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement