diff --git a/0_KPI_functions.py b/0_KPI_functions.py index 229ec89..0755352 100644 --- a/0_KPI_functions.py +++ b/0_KPI_functions.py @@ -113,20 +113,20 @@ def customerplus_kpi_function(customerplus_clean = None): customerplus_clean['categorie_age_70_80'] = ((customerplus_clean['age'] >= 70) & (customerplus_clean['age'] < 80)).astype(int) customerplus_clean['categorie_age_plus_80'] = (customerplus_clean['age'] >= 80).astype(int) customerplus_clean['categorie_age_inconnue'] = customerplus_clean['age'].apply(lambda x: 1 if pd.isna(x) else 0) - customerplus_clean.drop(columns = "age", inplace = True) + # customerplus_clean.drop(columns = "age", inplace = True) # Consentement au mailing customerplus_clean['opt_in'] = customerplus_clean['opt_in'].astype(int) # Indicatrice si individue vit en France customerplus_clean["country_fr"] = customerplus_clean["country"].apply(lambda x : int(x=="fr") if pd.notna(x) else np.nan) - customerplus_clean.drop(columns = "country", inplace = True) + # customerplus_clean.drop(columns = "country", inplace = True) customerplus_clean['is_profession_known'] = customerplus_clean['profession'].notna().astype(int) - customerplus_clean.drop(columns = "profession", inplace = True) + # customerplus_clean.drop(columns = "profession", inplace = True) customerplus_clean['is_zipcode_known'] = customerplus_clean['zipcode'].notna().astype(int) - customerplus_clean.drop(columns = "zipcode", inplace = True) + # customerplus_clean.drop(columns = "zipcode", inplace = True) return customerplus_clean