Olympics DataΒΆ
Statistics from the modern Olympic Games
import pandas as pd
olympics = pd.read_csv('olympics.csv')
medals = olympics.dropna(subset=["Medal"])
medals_winter = medals[medals["Season"]=="Winter"]
medals_winter_country = medals_winter.groupby('region').count().sort_values('Medal',ascending=False)['Medal']
medals_winter_country
region
Russia 759
USA 635
Germany 630
Canada 611
Norway 443
Sweden 428
Finland 426
Austria 280
Switzerland 275
Czech Republic 231
Italy 191
France 150
Netherlands 122
South Korea 86
UK 83
China 80
Japan 63
Poland 27
Slovenia 18
Australia 16
Latvia 15
Belarus 15
Belgium 13
Hungary 12
Croatia 11
Ukraine 11
Liechtenstein 9
Serbia 7
Kazakhstan 7
India 7
Estonia 7
Bulgaria 6
Slovakia 5
Denmark 5
North Korea 2
Romania 2
Luxembourg 2
Spain 2
New Zealand 1
Nepal 1
Uzbekistan 1
Name: Medal, dtype: int64