Session Ready
Exercise

Applying .drop_duplicates()

What could be the difference between the 'Event_gender' and 'Gender' columns? You should be able to evaluate your guess by looking at the unique values of the pairs (Event_gender, Gender) in the data. In particular, you should not see something like (Event_gender='M', Gender='Women'). However, you will see that, strangely enough, there is an observation with (Event_gender='W', Gender='Men').

The duplicates can be dropped using the .drop_duplicates() method, leaving behind the unique observations. The DataFrame has been loaded as medals.

Instructions
100 XP
  • Select the columns 'Event_gender' and 'Gender'.
  • Create a dataframe ev_gen_uniques containing the unique pairs contained in ev_gen.
  • Print ev_gen_uniques. This has been done for you, so hit 'Submit Answer' to see the result.