%matplotlib inline
import pandas as pd
import numpy as np
gapminder_r_url = "https://raw.githubusercontent.com/jennybc/gapminder/master/data-raw/07_gap-merged-with-continent.tsv"
gapminder = pd.read_csv(gapminder_r_url, sep="\t")
gapminder.shape
(3313, 6)
gapminder.head()
country | continent | year | lifeExp | pop | gdpPercap | |
---|---|---|---|---|---|---|
0 | Afghanistan | Asia | 1952 | 28.801 | 8425333 | 779.445314 |
1 | Afghanistan | Asia | 1957 | 30.332 | 9240934 | 820.853030 |
2 | Afghanistan | Asia | 1962 | 31.997 | 10267083 | 853.100710 |
3 | Afghanistan | Asia | 1967 | 34.020 | 11537966 | 836.197138 |
4 | Afghanistan | Asia | 1972 | 36.088 | 13079460 | 739.981106 |
gapminder.lifeExp.plot.hist()
<matplotlib.axes._subplots.AxesSubplot at 0x110a2df10>