I am trying to calculate the biggest difference between summer gold medal counts and winter gold medal counts relative to their total gold medal count. The problem is that
def answer_three(): atleast_one_gold = df[(df['Gold']>1) & (df['Gold.1']> 1)] return ((atleast_one_gold['Gold'] - atleast_one_gold['Gold.1'])/atleast_one_gold['Gold.2']).idxmax() answer_three()