Changes

Jump to navigation Jump to search
89 bytes added ,  10:45, 21 May 2019
m
no edit summary
Line 5: Line 5:  
</syntaxhighlight><syntaxhighlight lang="python3">
 
</syntaxhighlight><syntaxhighlight lang="python3">
 
from gapminder import gapminder as df
 
from gapminder import gapminder as df
 +
import matplotlib.pyplot as plt
 +
 
df.groupby('year')['lifeExp'].mean()
 
df.groupby('year')['lifeExp'].mean()
   Line 15: Line 17:     
global_yearly_life_expectancy = df.groupby('year')['lifeExp'].mean()
 
global_yearly_life_expectancy = df.groupby('year')['lifeExp'].mean()
 +
 +
# Plot
 +
global_yearly_life_expectancy.plot()
 +
plt.show()
    
</syntaxhighlight>
 
</syntaxhighlight>

Navigation menu