text_html_output_1.png text_plain_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

medals = pd.read_csv('../input/.csv')

counted = medals.pivot_table(index='NOC', values='Athlete', columns='Medal', aggfunc='count')
counted['totals'] = counted.sum(axis='columns')
counted = counted.sort_values('totals', ascending=False)
counted.head(15)