text_plain_output_1.png
import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

train_df = pd.read_csv('../input/covid19-global-forecasting-week-4/train.csv')
test_df = pd.read_csv('../input/covid19-global-forecasting-week-4/test.csv')

pop_info = pd.read_csv('../input/population-by-country-2020/population_by_country_2020.csv')

pop_info.rename(columns={'Density (P/Km²)': 'Density'}, inplace=True)

pop_info.columns

country_lookup = pop_info[['Country (or dependency)', 'Population (2020)', 'Density', 'Med. Age', 'Urban Pop %']]

pd.DataFrame.from_dict(country_lookup)
train_df_pop = pd.merge(train_df, country_lookup, how='left', left_on='Country_Region', right_on='Country (or dependency)')

train_df_pop.info()