From a32cbe70e454ebd219d025f6f6f1e56ff1dd8612 Mon Sep 17 00:00:00 2001 From: ajoubrel-ensae Date: Mon, 25 Mar 2024 17:44:31 +0000 Subject: [PATCH] Add variables for segmentation description --- 0_Cleaning_and_merge_functions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/0_Cleaning_and_merge_functions.py b/0_Cleaning_and_merge_functions.py index 01a1c00..d522efc 100644 --- a/0_Cleaning_and_merge_functions.py +++ b/0_Cleaning_and_merge_functions.py @@ -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', 'language', 'email', 'civility', 'note', 'extra', 'reference', 'extra_field', 'need_reload', 'preferred_category', 'preferred_supplier', 'preferred_formula', 'mcp_contact_id', 'last_visiting_date', 'deleted_at', 'last_buying_date', 'max_price', 'ticket_sum', 'average_price', 'average_purchase_delay' , 'average_price_basket', 'average_ticket_basket', 'total_price', 'purchase_count', 'first_buying_date', 'fidelity'], axis = 1, inplace=True) + customerplus_copy.drop(['lastname', 'firstname', 'birthdate', 'language', 'email', 'civility', 'note', 'extra', 'reference', 'extra_field', 'need_reload'], axis = 1, inplace=True) # 'preferred_category', 'preferred_supplier', 'preferred_formula', 'mcp_contact_id', 'last_visiting_date', 'deleted_at', 'last_buying_date', 'max_price', 'ticket_sum', 'average_price', 'average_purchase_delay' , 'average_price_basket', 'average_ticket_basket', 'total_price', 'purchase_count', 'first_buying_date', 'fidelity' customerplus_copy.rename(columns = {'id' : 'customer_id'}, inplace = True) return customerplus_copy