import pandas as pd
table1columns = [ "country-year", "type", "count"]
table1data =[ ["Afghanistan-1999", "cases", 745],
["Afghanistan-1999", "population", 19987071],
["Afghanistan-2000", "cases", 2666],
["Afghanistan-2000", "population", 20595360],
[ "Brazil-1999", "cases", 37737],
[ "Brazil-1999", "population", 172006362],
[ "Brazil-2000", "cases", 80488],
[ "Brazil-2000", "population", 174504898],
[ "China-1999", "cases", 212258],
[ "China-1999", "population",1272915272],
[ "China-2000", "cases", 213766],
[ "China-2000", "population",1280428583] ]
table1 = pd.DataFrame(table1data, columns=table1columns)
table1
table1columns = ["country", "year", "type", "count"]
table1data =[ ["Afghanistan", 1999, "cases", 745],
["Afghanistan", 1999, "population", 19987071],
["Afghanistan", 2000, "cases", 2666],
["Afghanistan", 2000, "population", 20595360],
[ "Brazil", 1999, "cases", 37737],
[ "Brazil", 1999, "population", 172006362],
[ "Brazil", 2000, "cases", 80488],
[ "Brazil", 2000, "population", 174504898],
[ "China", 1999, "cases", 212258],
[ "China", 1999, "population",1272915272],
[ "China", 2000, "cases", 213766],
[ "China", 2000, "population",1280428583] ]
table1 = pd.DataFrame(table1data, columns=table1columns)
table1
casescolumns = ["country", "1999", "2000"]
casesdata = [ ["Afghanistan", 745, 2666],
[ "Brazil", 37737, 80488],
[ "China", 212258, 213766] ]
cases = pd.DataFrame(casesdata, columns=casescolumns)
cases
popcolumns = ["country", "1999", "2000"]
popdata = [ ["Afghanistan", 19987071, 20595360],
[ "China", 1272915272, 1280428583],
[ "Brazil", 172006362, 174504898]]
population = pd.DataFrame(popdata, columns=popcolumns)
population
table3acolumns = ["country", "year", "cases"]
table3adata = [ ["Afghanistan", 1999, 745],
["Afghanistan", 2000, 2666],
[ "Brazil", 1999, 37737],
[ "Brazil", 2000, 80488],
[ "China", 1999, 212258],
[ "China", 2000, 213766] ]
table3bcolumns = ["country", "year", "population"]
table3bdata =[ ["Afghanistan", 1999, 19987071],
["Afghanistan", 2000, 20595360],
[ "Brazil", 1999, 172006362],
[ "Brazil", 2000, 174504898],
[ "China", 1999, 1272915272],
[ "China", 2000, 1280428583] ]
cases = pd.DataFrame(table3adata, columns=table3acolumns)
population = pd.DataFrame(table3bdata, columns=table3bcolumns)
cases
population
topnamesDoL = {'year': [2018, 2018, 2017, 2017, 2016, 2016],
'sex': ['Male', 'Female', 'Male',
'Female', 'Male', 'Female'],
'name': ['Liam', 'Emma', 'Liam', 'Emma',
'Noah', 'Emma'],
'count': [19837, 18688, 18798, 19800,
19117, 19496]}
indicatorDoL = {
'country': ['Canada', 'China', 'India',
'Russia', 'United States', 'Vietnam'],
'pop': [36.26, 1378.66, 1324.17, 144.34, 323.13, 94.59],
'gdp': [1535.77, 11199.15, 2263.79, 1283.16, 18624.47, 205.28],
'life': [82.30, 76.25, 68.56, 71.59, 78.69, 76.25],
'cell': [30.75, 1364.93, 1127.81, 229.13, 395.88, 120.60]}
codes = pd.Index(['CAN', 'CHN', 'IND', 'RUS', 'USA', 'VNM'],
name='code')
# Use read_csv()