Changes

Jump to navigation Jump to search
587 bytes added ,  10:41, 21 May 2019
Created page with "<syntaxhighlight lang="bash"> pip install pandas pip install gapminder </syntaxhighlight><syntaxhighlight lang="python3"> from gapminder import gapminder as df df.groupby('yea..."
<syntaxhighlight lang="bash">
pip install pandas
pip install gapminder
</syntaxhighlight><syntaxhighlight lang="python3">
from gapminder import gapminder as df
df.groupby('year')['lifeExp'].mean()

grouped_year_df = df.groupby('year')
grouped_year_df_lifeExp = grouped_year_df['lifeExp']
grouped_year_df_lifeExp.mean()
df.groupby(['year', 'continent'])[['lifeExp', 'gdpPercap']].mean()

df.groupby('continent')['country'].nunique()

global_yearly_life_expectancy = df.groupby('year')['lifeExp'].mean()

</syntaxhighlight>
[[Category:Python]]
[[Category:DataScience]]
[[Category:Pandas]]

Navigation menu