Changement sur customerplus
This commit is contained in:
parent
3670299a0b
commit
53f32000b5
|
@ -74,7 +74,7 @@ def preprocessing_customerplus(directory_path):
|
|||
cleaning_date(customerplus_copy, 'last_visiting_date')
|
||||
|
||||
# Selection des variables
|
||||
customerplus_copy.drop(['lastname', 'firstname', 'birthdate', 'profession', 'language', 'age', 'email', 'civility', 'note', 'extra', 'reference', 'extra_field', 'need_reload', 'preferred_category', 'preferred_supplier', 'preferred_formula', 'zipcode', 'last_visiting_date'], axis = 1, inplace=True)
|
||||
customerplus_copy.drop(['lastname', 'firstname', 'birthdate', 'language', 'email', 'civility', 'note', 'extra', 'reference', 'extra_field', 'need_reload', 'preferred_category', 'preferred_supplier', 'preferred_formula', 'mcp_contact_id' 'last_visiting_date', 'deleted_at'], axis = 1, inplace=True)
|
||||
customerplus_copy.rename(columns = {'id' : 'customer_id'}, inplace = True)
|
||||
|
||||
return customerplus_copy
|
||||
|
|
|
@ -97,6 +97,7 @@ def customerplus_kpi_function(customerplus_clean = None):
|
|||
gender_dummies = pd.get_dummies(customerplus_clean["gender_label"], prefix='gender').astype(int)
|
||||
customerplus_clean = pd.concat([customerplus_clean, gender_dummies], axis=1)
|
||||
|
||||
customerplus_clean['opt_in'] = np.multiply(customersplus['opt_in'], 1)
|
||||
## 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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user