<jupyter_start><jupyter_text>Importing the first dataframe with all the data<jupyter_code>url_all_data = "https://raw.githubusercontent.com/tlemenestrel/Coronavirus_Risk_Model/master/Data/all_data.pickle"

# Reading the downloaded content and making it a pandas dataframe

df_all_data = pd.read_pickle(url_all_data)

df_all_data = df_all_data.set_index('Area code')

# Printing out the first 5 rows of the dataframe

print (df_all_data.head())
print (df_all_data.shape)<jupyter_output>Area name                   Area type Specimen date  \
Area code                                                          
E09000033  Westminster  Upper tier local authority    2020-03-10   
E09000033  Westminster  Upper tier local authority    2020-03-11   
E09000033  Westminster  Lower tier local authority    2020-03-12   
E09000033  Westminster  Lower tier local authority    2020-03-13   
E09000033  Westminster  Lower tier local authority    2020-03-14   

           Daily lab-confirmed cases  Cumulative lab-confirmed cases  \
Area code                                                              
E09000033                        6.0                              24   
E09000033                       14.0                              38   
E09000033                       14.0                              52   
E09000033                        8.0                              60   
E09000033                       10.0                              70   

                Da[...]<jupyter_text>Importing the first dataframe with the authorities data<jupyter_code>url_authorities_data = "https://raw.githubusercontent.com/tlemenestrel/Coronavirus_Risk_Model/master/Data/authorities_data.csv"

# Reading the downloaded content and making it a pandas dataframe

df_authorities_data = pd.read_csv(url_authorities_data)

df_authorities_data = df_authorities_data.set_index('Code')

# Printing out the first 5 rows of the dataframe

print (df_authorities_data.head())
print (df_authorities_data.shape)<jupyter_output>Name  Area (sq km)  Estimated Population mid-2019  \
Code                                                                        
K02000001     UNITED KINGDOM        242749                       66796807   
K03000001      GREAT BRITAIN        228956                       64903140   
K04000001  ENGLAND AND WALES        151045                       59439840   
E92000001            ENGLAND        130309                       56286961   
E12000001         NORTH EAST          8574                        2669941   

           2019 people per sq. km  
Code                               
K02000001                     275  
K03000001                     283  
K04000001                     394  
E92000001                     432  
E12000001                     311  
(415, 4)<jupyter_text>Merging the two dataframes<jupyter_code>complete_df = df_authorities_data.merge( df_all_data,how='inner',left_index=True, right_index=True)

print (complete_df.head())
print (complete_df.shape)
complete_df.to_csv('complete_data.csv', index=False)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.048796356538711776, 'fraction_numerical': 0.10377358490566038, 'mean_word_length': 1.5905644481887111, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '216017', 'license': 'MIT', 'n_tokens_mistral': 1067, 'n_tokens_neox': 821, 'n_words': 200, 'path': 'Data/Merging_dataframes.ipynb', 'repo_name': 'tlemenestrel/Coronavirus_Cases_Prediction', 'size': '3074'}