In [ ]:
import os
import os.path
import pandas as pd

datadir = "publicdata"
In [ ]:
path = os.path.join(datadir, "topnames.csv")
topnames0 = pd.read_csv(path)
topnames = topnames0.set_index(['year', 'sex'])
names0 = topnames0.head(10)
names = topnames.head(10)
In [ ]:
path = os.path.join(datadir, "indicators2016.csv")
indicators0 = pd.read_csv(path)
indicators = indicators0.set_index(['code'])

ind1 = indicators.loc[['CHN', 'IND', 'USA'], :'life']
ind1
In [ ]: