Q5 - Onur Yigit Arpali
unknown
python
5 years ago
436 B
13
Indexable
# _ _ ___ _____ _____
# | \ | |/ _ \_ _| ____|
# | \| | | | || | | _|
# | |\ | |_| || | | |___
# |_| \_|\___/ |_| |_____|
#
# Assumed dataset file in same directory with the script
#
import pandas as pd
df = pd.read_csv('country_vaccination_stats.csv')
max3_med_daily_vacc = df.groupby('country').agg({'daily_vaccinations': 'median'}).nlargest(3,'daily_vaccinations')
print(max3_med_daily_vacc)Editor is loading...