Q5 - Onur Yigit Arpali
Anonymous
python
03/08/2021 11:25 AM
584 B
21
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...