Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas : stratification (mean)

# STRATIFICHIAMO : per ogni anno, ciascun continente deve avere la sua media 'lifeExp' e 'gdpPercap'
print(df.groupby(['year', 'continent'])[['lifeExp', 'gdpPercap']].mean())
 
PREVIOUS NEXT
Tagged: #pandas #stratification
ADD COMMENT
Topic
Name
2+4 =