<jupyter_start><jupyter_text>Main<jupyter_code>df_ges=df_get(filepath_data)
df_ges.head()
df_ges["Valeur"] = df_ges["Valeur"]/1000
df_ges.isna().sum()
df_ges.head()
df_ges[["Ville",'dept']]=df_ges["Entité_administrative"].str.rsplit(n=1,expand=True)
df_ges.head()
df_ges["dept"]=df_ges["dept"].str.replace("(","").str.replace(")","")
pop_dtypes = { 'Code région': str, 'Nom de la région': str, 'Code département': str, 'Code arrondissement': str, 'Code canton': str, 'Code commune': str, 'Nom de la commune': str, 'Population municipale': int, 'Population comptée à part': int, 'Population totale': int}
df_communes=pd.read_excel (r"C:\Users\gille\Desktop\DESU Data Science\070 - Machine Learning\010 - Datasets\ensemble.xls", 
                    sheet_name="Communes",skiprows=7,dtype=pop_dtypes)
df_communes.dtypes
unidecode
df_final = pd.merge(df_ges,
                    df_communes,
                    left_on=['Ville','dept'],
                    right_on=['Nom de la commune','Code département'],
                    how = 'left')
df_final<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16975881261595546, 'fraction_numerical': 0.011131725417439703, 'mean_word_length': 4.3681592039801, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '626755', 'license': 'MIT', 'n_tokens_mistral': 405, 'n_tokens_neox': 394, 'n_words': 68, 'path': 'notebooks/DESU DS GARDY - GES .ipynb', 'repo_name': 'mrsggardy/Foncier', 'size': '1078'}