diff --git a/[lab-customer-analysis-round-2]TiagoQuaresma.ipynb b/[lab-customer-analysis-round-2]TiagoQuaresma.ipynb new file mode 100644 index 0000000..a701624 --- /dev/null +++ b/[lab-customer-analysis-round-2]TiagoQuaresma.ipynb @@ -0,0 +1,3555 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 282, + "id": "b6fc1519", + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "import warnings\n", + "warnings.filterwarnings('ignore')\n", + "\n", + "import time\n", + "from datetime import date" + ] + }, + { + "cell_type": "code", + "execution_count": 283, + "id": "433add14", + "metadata": {}, + "outputs": [], + "source": [ + "data=pd.read_csv(r'C:\\Users\\Quaresma\\Documents\\IRONHACK\\Lesson 4\\lab-customer-analysis-round-2\\files_for_lab\\csv_files\\marketing_customer_analysis.csv')" + ] + }, + { + "cell_type": "code", + "execution_count": 284, + "id": "6d75b545", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + " | Unnamed: 0 | \n", + "Customer | \n", + "State | \n", + "Customer Lifetime Value | \n", + "Response | \n", + "Coverage | \n", + "Education | \n", + "Effective To Date | \n", + "EmploymentStatus | \n", + "Gender | \n", + "... | \n", + "Number of Open Complaints | \n", + "Number of Policies | \n", + "Policy Type | \n", + "Policy | \n", + "Renew Offer Type | \n", + "Sales Channel | \n", + "Total Claim Amount | \n", + "Vehicle Class | \n", + "Vehicle Size | \n", + "Vehicle Type | \n", + "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", + "0 | \n", + "DK49336 | \n", + "Arizona | \n", + "4809.216960 | \n", + "No | \n", + "Basic | \n", + "College | \n", + "2/18/11 | \n", + "Employed | \n", + "M | \n", + "... | \n", + "0.0 | \n", + "9 | \n", + "Corporate Auto | \n", + "Corporate L3 | \n", + "Offer3 | \n", + "Agent | \n", + "292.800000 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "NaN | \n", + "
1 | \n", + "1 | \n", + "KX64629 | \n", + "California | \n", + "2228.525238 | \n", + "No | \n", + "Basic | \n", + "College | \n", + "1/18/11 | \n", + "Unemployed | \n", + "F | \n", + "... | \n", + "0.0 | \n", + "1 | \n", + "Personal Auto | \n", + "Personal L3 | \n", + "Offer4 | \n", + "Call Center | \n", + "744.924331 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "NaN | \n", + "
2 | \n", + "2 | \n", + "LZ68649 | \n", + "Washington | \n", + "14947.917300 | \n", + "No | \n", + "Basic | \n", + "Bachelor | \n", + "2/10/11 | \n", + "Employed | \n", + "M | \n", + "... | \n", + "0.0 | \n", + "2 | \n", + "Personal Auto | \n", + "Personal L3 | \n", + "Offer3 | \n", + "Call Center | \n", + "480.000000 | \n", + "SUV | \n", + "Medsize | \n", + "A | \n", + "
3 | \n", + "3 | \n", + "XL78013 | \n", + "Oregon | \n", + "22332.439460 | \n", + "Yes | \n", + "Extended | \n", + "College | \n", + "1/11/11 | \n", + "Employed | \n", + "M | \n", + "... | \n", + "0.0 | \n", + "2 | \n", + "Corporate Auto | \n", + "Corporate L3 | \n", + "Offer2 | \n", + "Branch | \n", + "484.013411 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "A | \n", + "
4 | \n", + "4 | \n", + "QA50777 | \n", + "Oregon | \n", + "9025.067525 | \n", + "No | \n", + "Premium | \n", + "Bachelor | \n", + "1/17/11 | \n", + "Medical Leave | \n", + "F | \n", + "... | \n", + "NaN | \n", + "7 | \n", + "Personal Auto | \n", + "Personal L2 | \n", + "Offer1 | \n", + "Branch | \n", + "707.925645 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "NaN | \n", + "
... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "
10905 | \n", + "10905 | \n", + "FE99816 | \n", + "Nevada | \n", + "15563.369440 | \n", + "No | \n", + "Premium | \n", + "Bachelor | \n", + "1/19/11 | \n", + "Unemployed | \n", + "F | \n", + "... | \n", + "NaN | \n", + "7 | \n", + "Personal Auto | \n", + "Personal L1 | \n", + "Offer3 | \n", + "Web | \n", + "1214.400000 | \n", + "Luxury Car | \n", + "Medsize | \n", + "A | \n", + "
10906 | \n", + "10906 | \n", + "KX53892 | \n", + "Oregon | \n", + "5259.444853 | \n", + "No | \n", + "Basic | \n", + "College | \n", + "1/6/11 | \n", + "Employed | \n", + "F | \n", + "... | \n", + "0.0 | \n", + "6 | \n", + "Personal Auto | \n", + "Personal L3 | \n", + "Offer2 | \n", + "Branch | \n", + "273.018929 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "A | \n", + "
10907 | \n", + "10907 | \n", + "TL39050 | \n", + "Arizona | \n", + "23893.304100 | \n", + "No | \n", + "Extended | \n", + "Bachelor | \n", + "2/6/11 | \n", + "Employed | \n", + "F | \n", + "... | \n", + "0.0 | \n", + "2 | \n", + "Corporate Auto | \n", + "Corporate L3 | \n", + "Offer1 | \n", + "Web | \n", + "381.306996 | \n", + "Luxury SUV | \n", + "Medsize | \n", + "NaN | \n", + "
10908 | \n", + "10908 | \n", + "WA60547 | \n", + "California | \n", + "11971.977650 | \n", + "No | \n", + "Premium | \n", + "College | \n", + "2/13/11 | \n", + "Employed | \n", + "F | \n", + "... | \n", + "4.0 | \n", + "6 | \n", + "Personal Auto | \n", + "Personal L1 | \n", + "Offer1 | \n", + "Branch | \n", + "618.288849 | \n", + "SUV | \n", + "Medsize | \n", + "A | \n", + "
10909 | \n", + "10909 | \n", + "IV32877 | \n", + "NaN | \n", + "6857.519928 | \n", + "NaN | \n", + "Basic | \n", + "Bachelor | \n", + "1/8/11 | \n", + "Unemployed | \n", + "M | \n", + "... | \n", + "0.0 | \n", + "3 | \n", + "Personal Auto | \n", + "Personal L1 | \n", + "Offer4 | \n", + "Web | \n", + "1021.719397 | \n", + "SUV | \n", + "Medsize | \n", + "NaN | \n", + "
10910 rows × 26 columns
\n", + "\n", + " | customer | \n", + "state | \n", + "customer_lifetime_value | \n", + "response | \n", + "coverage | \n", + "education | \n", + "effective_to_date | \n", + "employmentstatus | \n", + "gender | \n", + "income | \n", + "... | \n", + "number_of_open_complaints | \n", + "number_of_policies | \n", + "policy_type | \n", + "policy | \n", + "renew_offer_type | \n", + "sales_channel | \n", + "total_claim_amount | \n", + "vehicle_class | \n", + "vehicle_size | \n", + "vehicle_type | \n", + "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", + "DK49336 | \n", + "Arizona | \n", + "4809.216960 | \n", + "No | \n", + "Basic | \n", + "College | \n", + "2/18/11 | \n", + "Employed | \n", + "M | \n", + "48029 | \n", + "... | \n", + "0.0 | \n", + "9 | \n", + "Corporate Auto | \n", + "Corporate L3 | \n", + "Offer3 | \n", + "Agent | \n", + "292.800000 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "NaN | \n", + "
1 | \n", + "KX64629 | \n", + "California | \n", + "2228.525238 | \n", + "No | \n", + "Basic | \n", + "College | \n", + "1/18/11 | \n", + "Unemployed | \n", + "F | \n", + "0 | \n", + "... | \n", + "0.0 | \n", + "1 | \n", + "Personal Auto | \n", + "Personal L3 | \n", + "Offer4 | \n", + "Call Center | \n", + "744.924331 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "NaN | \n", + "
2 | \n", + "LZ68649 | \n", + "Washington | \n", + "14947.917300 | \n", + "No | \n", + "Basic | \n", + "Bachelor | \n", + "2/10/11 | \n", + "Employed | \n", + "M | \n", + "22139 | \n", + "... | \n", + "0.0 | \n", + "2 | \n", + "Personal Auto | \n", + "Personal L3 | \n", + "Offer3 | \n", + "Call Center | \n", + "480.000000 | \n", + "SUV | \n", + "Medsize | \n", + "A | \n", + "
3 | \n", + "XL78013 | \n", + "Oregon | \n", + "22332.439460 | \n", + "Yes | \n", + "Extended | \n", + "College | \n", + "1/11/11 | \n", + "Employed | \n", + "M | \n", + "49078 | \n", + "... | \n", + "0.0 | \n", + "2 | \n", + "Corporate Auto | \n", + "Corporate L3 | \n", + "Offer2 | \n", + "Branch | \n", + "484.013411 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "A | \n", + "
4 | \n", + "QA50777 | \n", + "Oregon | \n", + "9025.067525 | \n", + "No | \n", + "Premium | \n", + "Bachelor | \n", + "1/17/11 | \n", + "Medical Leave | \n", + "F | \n", + "23675 | \n", + "... | \n", + "NaN | \n", + "7 | \n", + "Personal Auto | \n", + "Personal L2 | \n", + "Offer1 | \n", + "Branch | \n", + "707.925645 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "NaN | \n", + "
... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "
10905 | \n", + "FE99816 | \n", + "Nevada | \n", + "15563.369440 | \n", + "No | \n", + "Premium | \n", + "Bachelor | \n", + "1/19/11 | \n", + "Unemployed | \n", + "F | \n", + "0 | \n", + "... | \n", + "NaN | \n", + "7 | \n", + "Personal Auto | \n", + "Personal L1 | \n", + "Offer3 | \n", + "Web | \n", + "1214.400000 | \n", + "Luxury Car | \n", + "Medsize | \n", + "A | \n", + "
10906 | \n", + "KX53892 | \n", + "Oregon | \n", + "5259.444853 | \n", + "No | \n", + "Basic | \n", + "College | \n", + "1/6/11 | \n", + "Employed | \n", + "F | \n", + "61146 | \n", + "... | \n", + "0.0 | \n", + "6 | \n", + "Personal Auto | \n", + "Personal L3 | \n", + "Offer2 | \n", + "Branch | \n", + "273.018929 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "A | \n", + "
10907 | \n", + "TL39050 | \n", + "Arizona | \n", + "23893.304100 | \n", + "No | \n", + "Extended | \n", + "Bachelor | \n", + "2/6/11 | \n", + "Employed | \n", + "F | \n", + "39837 | \n", + "... | \n", + "0.0 | \n", + "2 | \n", + "Corporate Auto | \n", + "Corporate L3 | \n", + "Offer1 | \n", + "Web | \n", + "381.306996 | \n", + "Luxury SUV | \n", + "Medsize | \n", + "NaN | \n", + "
10908 | \n", + "WA60547 | \n", + "California | \n", + "11971.977650 | \n", + "No | \n", + "Premium | \n", + "College | \n", + "2/13/11 | \n", + "Employed | \n", + "F | \n", + "64195 | \n", + "... | \n", + "4.0 | \n", + "6 | \n", + "Personal Auto | \n", + "Personal L1 | \n", + "Offer1 | \n", + "Branch | \n", + "618.288849 | \n", + "SUV | \n", + "Medsize | \n", + "A | \n", + "
10909 | \n", + "IV32877 | \n", + "NaN | \n", + "6857.519928 | \n", + "NaN | \n", + "Basic | \n", + "Bachelor | \n", + "1/8/11 | \n", + "Unemployed | \n", + "M | \n", + "0 | \n", + "... | \n", + "0.0 | \n", + "3 | \n", + "Personal Auto | \n", + "Personal L1 | \n", + "Offer4 | \n", + "Web | \n", + "1021.719397 | \n", + "SUV | \n", + "Medsize | \n", + "NaN | \n", + "
10910 rows × 25 columns
\n", + "\n", + " | customer_lifetime_value | \n", + "income | \n", + "monthly_premium_auto | \n", + "months_since_last_claim | \n", + "months_since_policy_inception | \n", + "number_of_open_complaints | \n", + "number_of_policies | \n", + "total_claim_amount | \n", + "
---|---|---|---|---|---|---|---|---|
0 | \n", + "4809.216960 | \n", + "48029 | \n", + "61 | \n", + "7.0 | \n", + "52 | \n", + "0.0 | \n", + "9 | \n", + "292.800000 | \n", + "
1 | \n", + "2228.525238 | \n", + "0 | \n", + "64 | \n", + "3.0 | \n", + "26 | \n", + "0.0 | \n", + "1 | \n", + "744.924331 | \n", + "
2 | \n", + "14947.917300 | \n", + "22139 | \n", + "100 | \n", + "34.0 | \n", + "31 | \n", + "0.0 | \n", + "2 | \n", + "480.000000 | \n", + "
3 | \n", + "22332.439460 | \n", + "49078 | \n", + "97 | \n", + "10.0 | \n", + "3 | \n", + "0.0 | \n", + "2 | \n", + "484.013411 | \n", + "
4 | \n", + "9025.067525 | \n", + "23675 | \n", + "117 | \n", + "NaN | \n", + "31 | \n", + "NaN | \n", + "7 | \n", + "707.925645 | \n", + "
... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "
10905 | \n", + "15563.369440 | \n", + "0 | \n", + "253 | \n", + "NaN | \n", + "40 | \n", + "NaN | \n", + "7 | \n", + "1214.400000 | \n", + "
10906 | \n", + "5259.444853 | \n", + "61146 | \n", + "65 | \n", + "7.0 | \n", + "68 | \n", + "0.0 | \n", + "6 | \n", + "273.018929 | \n", + "
10907 | \n", + "23893.304100 | \n", + "39837 | \n", + "201 | \n", + "11.0 | \n", + "63 | \n", + "0.0 | \n", + "2 | \n", + "381.306996 | \n", + "
10908 | \n", + "11971.977650 | \n", + "64195 | \n", + "158 | \n", + "0.0 | \n", + "27 | \n", + "4.0 | \n", + "6 | \n", + "618.288849 | \n", + "
10909 | \n", + "6857.519928 | \n", + "0 | \n", + "101 | \n", + "31.0 | \n", + "1 | \n", + "0.0 | \n", + "3 | \n", + "1021.719397 | \n", + "
10910 rows × 8 columns
\n", + "\n", + " | customer | \n", + "state | \n", + "response | \n", + "coverage | \n", + "education | \n", + "effective_to_date | \n", + "employmentstatus | \n", + "gender | \n", + "location_code | \n", + "marital_status | \n", + "policy_type | \n", + "policy | \n", + "renew_offer_type | \n", + "sales_channel | \n", + "vehicle_class | \n", + "vehicle_size | \n", + "vehicle_type | \n", + "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", + "DK49336 | \n", + "Arizona | \n", + "No | \n", + "Basic | \n", + "College | \n", + "2/18/11 | \n", + "Employed | \n", + "M | \n", + "Suburban | \n", + "Married | \n", + "Corporate Auto | \n", + "Corporate L3 | \n", + "Offer3 | \n", + "Agent | \n", + "Four-Door Car | \n", + "Medsize | \n", + "NaN | \n", + "
1 | \n", + "KX64629 | \n", + "California | \n", + "No | \n", + "Basic | \n", + "College | \n", + "1/18/11 | \n", + "Unemployed | \n", + "F | \n", + "Suburban | \n", + "Single | \n", + "Personal Auto | \n", + "Personal L3 | \n", + "Offer4 | \n", + "Call Center | \n", + "Four-Door Car | \n", + "Medsize | \n", + "NaN | \n", + "
2 | \n", + "LZ68649 | \n", + "Washington | \n", + "No | \n", + "Basic | \n", + "Bachelor | \n", + "2/10/11 | \n", + "Employed | \n", + "M | \n", + "Suburban | \n", + "Single | \n", + "Personal Auto | \n", + "Personal L3 | \n", + "Offer3 | \n", + "Call Center | \n", + "SUV | \n", + "Medsize | \n", + "A | \n", + "
3 | \n", + "XL78013 | \n", + "Oregon | \n", + "Yes | \n", + "Extended | \n", + "College | \n", + "1/11/11 | \n", + "Employed | \n", + "M | \n", + "Suburban | \n", + "Single | \n", + "Corporate Auto | \n", + "Corporate L3 | \n", + "Offer2 | \n", + "Branch | \n", + "Four-Door Car | \n", + "Medsize | \n", + "A | \n", + "
4 | \n", + "QA50777 | \n", + "Oregon | \n", + "No | \n", + "Premium | \n", + "Bachelor | \n", + "1/17/11 | \n", + "Medical Leave | \n", + "F | \n", + "Suburban | \n", + "Married | \n", + "Personal Auto | \n", + "Personal L2 | \n", + "Offer1 | \n", + "Branch | \n", + "Four-Door Car | \n", + "Medsize | \n", + "NaN | \n", + "
... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "
10905 | \n", + "FE99816 | \n", + "Nevada | \n", + "No | \n", + "Premium | \n", + "Bachelor | \n", + "1/19/11 | \n", + "Unemployed | \n", + "F | \n", + "Suburban | \n", + "Married | \n", + "Personal Auto | \n", + "Personal L1 | \n", + "Offer3 | \n", + "Web | \n", + "Luxury Car | \n", + "Medsize | \n", + "A | \n", + "
10906 | \n", + "KX53892 | \n", + "Oregon | \n", + "No | \n", + "Basic | \n", + "College | \n", + "1/6/11 | \n", + "Employed | \n", + "F | \n", + "Urban | \n", + "Married | \n", + "Personal Auto | \n", + "Personal L3 | \n", + "Offer2 | \n", + "Branch | \n", + "Four-Door Car | \n", + "Medsize | \n", + "A | \n", + "
10907 | \n", + "TL39050 | \n", + "Arizona | \n", + "No | \n", + "Extended | \n", + "Bachelor | \n", + "2/6/11 | \n", + "Employed | \n", + "F | \n", + "Rural | \n", + "Married | \n", + "Corporate Auto | \n", + "Corporate L3 | \n", + "Offer1 | \n", + "Web | \n", + "Luxury SUV | \n", + "Medsize | \n", + "NaN | \n", + "
10908 | \n", + "WA60547 | \n", + "California | \n", + "No | \n", + "Premium | \n", + "College | \n", + "2/13/11 | \n", + "Employed | \n", + "F | \n", + "Urban | \n", + "Divorced | \n", + "Personal Auto | \n", + "Personal L1 | \n", + "Offer1 | \n", + "Branch | \n", + "SUV | \n", + "Medsize | \n", + "A | \n", + "
10909 | \n", + "IV32877 | \n", + "NaN | \n", + "NaN | \n", + "Basic | \n", + "Bachelor | \n", + "1/8/11 | \n", + "Unemployed | \n", + "M | \n", + "Suburban | \n", + "Single | \n", + "Personal Auto | \n", + "Personal L1 | \n", + "Offer4 | \n", + "Web | \n", + "SUV | \n", + "Medsize | \n", + "NaN | \n", + "
10910 rows × 17 columns
\n", + "\n", + " | state | \n", + "response | \n", + "months_since_last_claim | \n", + "number_of_open_complaints | \n", + "vehicle_class | \n", + "vehicle_size | \n", + "
---|---|---|---|---|---|---|
4 | \n", + "Oregon | \n", + "No | \n", + "NaN | \n", + "NaN | \n", + "Four-Door Car | \n", + "Medsize | \n", + "
5 | \n", + "NaN | \n", + "NaN | \n", + "2.0 | \n", + "0.0 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "
11 | \n", + "NaN | \n", + "NaN | \n", + "5.0 | \n", + "0.0 | \n", + "Two-Door Car | \n", + "Medsize | \n", + "
23 | \n", + "California | \n", + "No | \n", + "NaN | \n", + "NaN | \n", + "Four-Door Car | \n", + "Medsize | \n", + "
51 | \n", + "Arizona | \n", + "No | \n", + "NaN | \n", + "NaN | \n", + "Four-Door Car | \n", + "Large | \n", + "
... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "
10883 | \n", + "Oregon | \n", + "No | \n", + "18.0 | \n", + "3.0 | \n", + "NaN | \n", + "NaN | \n", + "
10890 | \n", + "Oregon | \n", + "No | \n", + "24.0 | \n", + "0.0 | \n", + "NaN | \n", + "NaN | \n", + "
10894 | \n", + "NaN | \n", + "NaN | \n", + "13.0 | \n", + "0.0 | \n", + "Four-Door Car | \n", + "Small | \n", + "
10905 | \n", + "Nevada | \n", + "No | \n", + "NaN | \n", + "NaN | \n", + "Luxury Car | \n", + "Medsize | \n", + "
10909 | \n", + "NaN | \n", + "NaN | \n", + "31.0 | \n", + "0.0 | \n", + "SUV | \n", + "Medsize | \n", + "
1776 rows × 6 columns
\n", + "\n", + " | customer | \n", + "state | \n", + "customer_lifetime_value | \n", + "response | \n", + "coverage | \n", + "education | \n", + "effective_to_date | \n", + "employmentstatus | \n", + "gender | \n", + "income | \n", + "... | \n", + "number_of_open_complaints | \n", + "number_of_policies | \n", + "policy_type | \n", + "policy | \n", + "renew_offer_type | \n", + "sales_channel | \n", + "total_claim_amount | \n", + "vehicle_class | \n", + "vehicle_size | \n", + "effective_to_date_og | \n", + "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", + "DK49336 | \n", + "Arizona | \n", + "4809.216960 | \n", + "No | \n", + "Basic | \n", + "College | \n", + "2/18/11 | \n", + "Employed | \n", + "M | \n", + "48029 | \n", + "... | \n", + "0.0 | \n", + "9 | \n", + "Corporate Auto | \n", + "Corporate L3 | \n", + "Offer3 | \n", + "Agent | \n", + "292.800000 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "2011-02-18 | \n", + "
1 | \n", + "KX64629 | \n", + "California | \n", + "2228.525238 | \n", + "No | \n", + "Basic | \n", + "College | \n", + "1/18/11 | \n", + "Unemployed | \n", + "F | \n", + "0 | \n", + "... | \n", + "0.0 | \n", + "1 | \n", + "Personal Auto | \n", + "Personal L3 | \n", + "Offer4 | \n", + "Call Center | \n", + "744.924331 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "2011-01-18 | \n", + "
2 | \n", + "LZ68649 | \n", + "Washington | \n", + "14947.917300 | \n", + "No | \n", + "Basic | \n", + "Bachelor | \n", + "2/10/11 | \n", + "Employed | \n", + "M | \n", + "22139 | \n", + "... | \n", + "0.0 | \n", + "2 | \n", + "Personal Auto | \n", + "Personal L3 | \n", + "Offer3 | \n", + "Call Center | \n", + "480.000000 | \n", + "SUV | \n", + "Medsize | \n", + "2011-02-10 | \n", + "
3 | \n", + "XL78013 | \n", + "Oregon | \n", + "22332.439460 | \n", + "Yes | \n", + "Extended | \n", + "College | \n", + "1/11/11 | \n", + "Employed | \n", + "M | \n", + "49078 | \n", + "... | \n", + "0.0 | \n", + "2 | \n", + "Corporate Auto | \n", + "Corporate L3 | \n", + "Offer2 | \n", + "Branch | \n", + "484.013411 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "2011-01-11 | \n", + "
4 | \n", + "QA50777 | \n", + "Oregon | \n", + "9025.067525 | \n", + "No | \n", + "Premium | \n", + "Bachelor | \n", + "1/17/11 | \n", + "Medical Leave | \n", + "F | \n", + "23675 | \n", + "... | \n", + "NaN | \n", + "7 | \n", + "Personal Auto | \n", + "Personal L2 | \n", + "Offer1 | \n", + "Branch | \n", + "707.925645 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "2011-01-17 | \n", + "
... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "
10905 | \n", + "FE99816 | \n", + "Nevada | \n", + "15563.369440 | \n", + "No | \n", + "Premium | \n", + "Bachelor | \n", + "1/19/11 | \n", + "Unemployed | \n", + "F | \n", + "0 | \n", + "... | \n", + "NaN | \n", + "7 | \n", + "Personal Auto | \n", + "Personal L1 | \n", + "Offer3 | \n", + "Web | \n", + "1214.400000 | \n", + "Luxury Car | \n", + "Medsize | \n", + "2011-01-19 | \n", + "
10906 | \n", + "KX53892 | \n", + "Oregon | \n", + "5259.444853 | \n", + "No | \n", + "Basic | \n", + "College | \n", + "1/6/11 | \n", + "Employed | \n", + "F | \n", + "61146 | \n", + "... | \n", + "0.0 | \n", + "6 | \n", + "Personal Auto | \n", + "Personal L3 | \n", + "Offer2 | \n", + "Branch | \n", + "273.018929 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "2011-01-06 | \n", + "
10907 | \n", + "TL39050 | \n", + "Arizona | \n", + "23893.304100 | \n", + "No | \n", + "Extended | \n", + "Bachelor | \n", + "2/6/11 | \n", + "Employed | \n", + "F | \n", + "39837 | \n", + "... | \n", + "0.0 | \n", + "2 | \n", + "Corporate Auto | \n", + "Corporate L3 | \n", + "Offer1 | \n", + "Web | \n", + "381.306996 | \n", + "Luxury SUV | \n", + "Medsize | \n", + "2011-02-06 | \n", + "
10908 | \n", + "WA60547 | \n", + "California | \n", + "11971.977650 | \n", + "No | \n", + "Premium | \n", + "College | \n", + "2/13/11 | \n", + "Employed | \n", + "F | \n", + "64195 | \n", + "... | \n", + "4.0 | \n", + "6 | \n", + "Personal Auto | \n", + "Personal L1 | \n", + "Offer1 | \n", + "Branch | \n", + "618.288849 | \n", + "SUV | \n", + "Medsize | \n", + "2011-02-13 | \n", + "
10909 | \n", + "IV32877 | \n", + "NaN | \n", + "6857.519928 | \n", + "NaN | \n", + "Basic | \n", + "Bachelor | \n", + "1/8/11 | \n", + "Unemployed | \n", + "M | \n", + "0 | \n", + "... | \n", + "0.0 | \n", + "3 | \n", + "Personal Auto | \n", + "Personal L1 | \n", + "Offer4 | \n", + "Web | \n", + "1021.719397 | \n", + "SUV | \n", + "Medsize | \n", + "2011-01-08 | \n", + "
10910 rows × 25 columns
\n", + "\n", + " | customer | \n", + "state | \n", + "customer_lifetime_value | \n", + "response | \n", + "coverage | \n", + "education | \n", + "effective_to_date | \n", + "employmentstatus | \n", + "gender | \n", + "income | \n", + "... | \n", + "number_of_policies | \n", + "policy_type | \n", + "policy | \n", + "renew_offer_type | \n", + "sales_channel | \n", + "total_claim_amount | \n", + "vehicle_class | \n", + "vehicle_size | \n", + "effective_to_date_og | \n", + "month | \n", + "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", + "DK49336 | \n", + "Arizona | \n", + "4809.216960 | \n", + "No | \n", + "Basic | \n", + "College | \n", + "2/18/11 | \n", + "Employed | \n", + "M | \n", + "48029 | \n", + "... | \n", + "9 | \n", + "Corporate Auto | \n", + "Corporate L3 | \n", + "Offer3 | \n", + "Agent | \n", + "292.800000 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "2011-02-18 | \n", + "2 | \n", + "
1 | \n", + "KX64629 | \n", + "California | \n", + "2228.525238 | \n", + "No | \n", + "Basic | \n", + "College | \n", + "1/18/11 | \n", + "Unemployed | \n", + "F | \n", + "0 | \n", + "... | \n", + "1 | \n", + "Personal Auto | \n", + "Personal L3 | \n", + "Offer4 | \n", + "Call Center | \n", + "744.924331 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "2011-01-18 | \n", + "1 | \n", + "
2 | \n", + "LZ68649 | \n", + "Washington | \n", + "14947.917300 | \n", + "No | \n", + "Basic | \n", + "Bachelor | \n", + "2/10/11 | \n", + "Employed | \n", + "M | \n", + "22139 | \n", + "... | \n", + "2 | \n", + "Personal Auto | \n", + "Personal L3 | \n", + "Offer3 | \n", + "Call Center | \n", + "480.000000 | \n", + "SUV | \n", + "Medsize | \n", + "2011-02-10 | \n", + "2 | \n", + "
3 | \n", + "XL78013 | \n", + "Oregon | \n", + "22332.439460 | \n", + "Yes | \n", + "Extended | \n", + "College | \n", + "1/11/11 | \n", + "Employed | \n", + "M | \n", + "49078 | \n", + "... | \n", + "2 | \n", + "Corporate Auto | \n", + "Corporate L3 | \n", + "Offer2 | \n", + "Branch | \n", + "484.013411 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "2011-01-11 | \n", + "1 | \n", + "
4 | \n", + "QA50777 | \n", + "Oregon | \n", + "9025.067525 | \n", + "No | \n", + "Premium | \n", + "Bachelor | \n", + "1/17/11 | \n", + "Medical Leave | \n", + "F | \n", + "23675 | \n", + "... | \n", + "7 | \n", + "Personal Auto | \n", + "Personal L2 | \n", + "Offer1 | \n", + "Branch | \n", + "707.925645 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "2011-01-17 | \n", + "1 | \n", + "
... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "
10905 | \n", + "FE99816 | \n", + "Nevada | \n", + "15563.369440 | \n", + "No | \n", + "Premium | \n", + "Bachelor | \n", + "1/19/11 | \n", + "Unemployed | \n", + "F | \n", + "0 | \n", + "... | \n", + "7 | \n", + "Personal Auto | \n", + "Personal L1 | \n", + "Offer3 | \n", + "Web | \n", + "1214.400000 | \n", + "Luxury Car | \n", + "Medsize | \n", + "2011-01-19 | \n", + "1 | \n", + "
10906 | \n", + "KX53892 | \n", + "Oregon | \n", + "5259.444853 | \n", + "No | \n", + "Basic | \n", + "College | \n", + "1/6/11 | \n", + "Employed | \n", + "F | \n", + "61146 | \n", + "... | \n", + "6 | \n", + "Personal Auto | \n", + "Personal L3 | \n", + "Offer2 | \n", + "Branch | \n", + "273.018929 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "2011-01-06 | \n", + "1 | \n", + "
10907 | \n", + "TL39050 | \n", + "Arizona | \n", + "23893.304100 | \n", + "No | \n", + "Extended | \n", + "Bachelor | \n", + "2/6/11 | \n", + "Employed | \n", + "F | \n", + "39837 | \n", + "... | \n", + "2 | \n", + "Corporate Auto | \n", + "Corporate L3 | \n", + "Offer1 | \n", + "Web | \n", + "381.306996 | \n", + "Luxury SUV | \n", + "Medsize | \n", + "2011-02-06 | \n", + "2 | \n", + "
10908 | \n", + "WA60547 | \n", + "California | \n", + "11971.977650 | \n", + "No | \n", + "Premium | \n", + "College | \n", + "2/13/11 | \n", + "Employed | \n", + "F | \n", + "64195 | \n", + "... | \n", + "6 | \n", + "Personal Auto | \n", + "Personal L1 | \n", + "Offer1 | \n", + "Branch | \n", + "618.288849 | \n", + "SUV | \n", + "Medsize | \n", + "2011-02-13 | \n", + "2 | \n", + "
10909 | \n", + "IV32877 | \n", + "NaN | \n", + "6857.519928 | \n", + "NaN | \n", + "Basic | \n", + "Bachelor | \n", + "1/8/11 | \n", + "Unemployed | \n", + "M | \n", + "0 | \n", + "... | \n", + "3 | \n", + "Personal Auto | \n", + "Personal L1 | \n", + "Offer4 | \n", + "Web | \n", + "1021.719397 | \n", + "SUV | \n", + "Medsize | \n", + "2011-01-08 | \n", + "1 | \n", + "
10910 rows × 26 columns
\n", + "\n", + " | customer | \n", + "state | \n", + "customer_lifetime_value | \n", + "response | \n", + "coverage | \n", + "education | \n", + "effective_to_date | \n", + "employmentstatus | \n", + "gender | \n", + "income | \n", + "... | \n", + "number_of_policies | \n", + "policy_type | \n", + "policy | \n", + "renew_offer_type | \n", + "sales_channel | \n", + "total_claim_amount | \n", + "vehicle_class | \n", + "vehicle_size | \n", + "effective_to_date_og | \n", + "month | \n", + "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", + "DK49336 | \n", + "Arizona | \n", + "4809.216960 | \n", + "No | \n", + "Basic | \n", + "College | \n", + "2/18/11 | \n", + "Employed | \n", + "M | \n", + "48029 | \n", + "... | \n", + "9 | \n", + "Corporate Auto | \n", + "Corporate L3 | \n", + "Offer3 | \n", + "Agent | \n", + "292.800000 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "2011-02-18 | \n", + "2 | \n", + "
1 | \n", + "KX64629 | \n", + "California | \n", + "2228.525238 | \n", + "No | \n", + "Basic | \n", + "College | \n", + "1/18/11 | \n", + "Unemployed | \n", + "F | \n", + "0 | \n", + "... | \n", + "1 | \n", + "Personal Auto | \n", + "Personal L3 | \n", + "Offer4 | \n", + "Call Center | \n", + "744.924331 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "2011-01-18 | \n", + "1 | \n", + "
2 | \n", + "LZ68649 | \n", + "Washington | \n", + "14947.917300 | \n", + "No | \n", + "Basic | \n", + "Bachelor | \n", + "2/10/11 | \n", + "Employed | \n", + "M | \n", + "22139 | \n", + "... | \n", + "2 | \n", + "Personal Auto | \n", + "Personal L3 | \n", + "Offer3 | \n", + "Call Center | \n", + "480.000000 | \n", + "SUV | \n", + "Medsize | \n", + "2011-02-10 | \n", + "2 | \n", + "
3 | \n", + "XL78013 | \n", + "Oregon | \n", + "22332.439460 | \n", + "Yes | \n", + "Extended | \n", + "College | \n", + "1/11/11 | \n", + "Employed | \n", + "M | \n", + "49078 | \n", + "... | \n", + "2 | \n", + "Corporate Auto | \n", + "Corporate L3 | \n", + "Offer2 | \n", + "Branch | \n", + "484.013411 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "2011-01-11 | \n", + "1 | \n", + "
4 | \n", + "QA50777 | \n", + "Oregon | \n", + "9025.067525 | \n", + "No | \n", + "Premium | \n", + "Bachelor | \n", + "1/17/11 | \n", + "Medical Leave | \n", + "F | \n", + "23675 | \n", + "... | \n", + "7 | \n", + "Personal Auto | \n", + "Personal L2 | \n", + "Offer1 | \n", + "Branch | \n", + "707.925645 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "2011-01-17 | \n", + "1 | \n", + "
... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "
10905 | \n", + "FE99816 | \n", + "Nevada | \n", + "15563.369440 | \n", + "No | \n", + "Premium | \n", + "Bachelor | \n", + "1/19/11 | \n", + "Unemployed | \n", + "F | \n", + "0 | \n", + "... | \n", + "7 | \n", + "Personal Auto | \n", + "Personal L1 | \n", + "Offer3 | \n", + "Web | \n", + "1214.400000 | \n", + "Luxury Car | \n", + "Medsize | \n", + "2011-01-19 | \n", + "1 | \n", + "
10906 | \n", + "KX53892 | \n", + "Oregon | \n", + "5259.444853 | \n", + "No | \n", + "Basic | \n", + "College | \n", + "1/6/11 | \n", + "Employed | \n", + "F | \n", + "61146 | \n", + "... | \n", + "6 | \n", + "Personal Auto | \n", + "Personal L3 | \n", + "Offer2 | \n", + "Branch | \n", + "273.018929 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "2011-01-06 | \n", + "1 | \n", + "
10907 | \n", + "TL39050 | \n", + "Arizona | \n", + "23893.304100 | \n", + "No | \n", + "Extended | \n", + "Bachelor | \n", + "2/6/11 | \n", + "Employed | \n", + "F | \n", + "39837 | \n", + "... | \n", + "2 | \n", + "Corporate Auto | \n", + "Corporate L3 | \n", + "Offer1 | \n", + "Web | \n", + "381.306996 | \n", + "Luxury SUV | \n", + "Medsize | \n", + "2011-02-06 | \n", + "2 | \n", + "
10908 | \n", + "WA60547 | \n", + "California | \n", + "11971.977650 | \n", + "No | \n", + "Premium | \n", + "College | \n", + "2/13/11 | \n", + "Employed | \n", + "F | \n", + "64195 | \n", + "... | \n", + "6 | \n", + "Personal Auto | \n", + "Personal L1 | \n", + "Offer1 | \n", + "Branch | \n", + "618.288849 | \n", + "SUV | \n", + "Medsize | \n", + "2011-02-13 | \n", + "2 | \n", + "
10909 | \n", + "IV32877 | \n", + "NaN | \n", + "6857.519928 | \n", + "NaN | \n", + "Basic | \n", + "Bachelor | \n", + "1/8/11 | \n", + "Unemployed | \n", + "M | \n", + "0 | \n", + "... | \n", + "3 | \n", + "Personal Auto | \n", + "Personal L1 | \n", + "Offer4 | \n", + "Web | \n", + "1021.719397 | \n", + "SUV | \n", + "Medsize | \n", + "2011-01-08 | \n", + "1 | \n", + "
10910 rows × 26 columns
\n", + "\n", + " | customer | \n", + "state | \n", + "customer_lifetime_value | \n", + "response | \n", + "coverage | \n", + "education | \n", + "effective_to_date | \n", + "employmentstatus | \n", + "gender | \n", + "income | \n", + "... | \n", + "number_of_open_complaints | \n", + "number_of_policies | \n", + "policy_type | \n", + "policy | \n", + "renew_offer_type | \n", + "sales_channel | \n", + "total_claim_amount | \n", + "vehicle_class | \n", + "vehicle_size | \n", + "quarter | \n", + "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", + "DK49336 | \n", + "Arizona | \n", + "4809.216960 | \n", + "No | \n", + "Basic | \n", + "College | \n", + "2011-02-18 | \n", + "Employed | \n", + "M | \n", + "48029 | \n", + "... | \n", + "0.0 | \n", + "9 | \n", + "Corporate Auto | \n", + "Corporate L3 | \n", + "Offer3 | \n", + "Agent | \n", + "292.800000 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "1 | \n", + "
1 | \n", + "KX64629 | \n", + "California | \n", + "2228.525238 | \n", + "No | \n", + "Basic | \n", + "College | \n", + "2011-01-18 | \n", + "Unemployed | \n", + "F | \n", + "0 | \n", + "... | \n", + "0.0 | \n", + "1 | \n", + "Personal Auto | \n", + "Personal L3 | \n", + "Offer4 | \n", + "Call Center | \n", + "744.924331 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "1 | \n", + "
2 | \n", + "LZ68649 | \n", + "Washington | \n", + "14947.917300 | \n", + "No | \n", + "Basic | \n", + "Bachelor | \n", + "2011-02-10 | \n", + "Employed | \n", + "M | \n", + "22139 | \n", + "... | \n", + "0.0 | \n", + "2 | \n", + "Personal Auto | \n", + "Personal L3 | \n", + "Offer3 | \n", + "Call Center | \n", + "480.000000 | \n", + "SUV | \n", + "Medsize | \n", + "1 | \n", + "
3 | \n", + "XL78013 | \n", + "Oregon | \n", + "22332.439460 | \n", + "Yes | \n", + "Extended | \n", + "College | \n", + "2011-01-11 | \n", + "Employed | \n", + "M | \n", + "49078 | \n", + "... | \n", + "0.0 | \n", + "2 | \n", + "Corporate Auto | \n", + "Corporate L3 | \n", + "Offer2 | \n", + "Branch | \n", + "484.013411 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "1 | \n", + "
4 | \n", + "QA50777 | \n", + "Oregon | \n", + "9025.067525 | \n", + "No | \n", + "Premium | \n", + "Bachelor | \n", + "2011-01-17 | \n", + "Medical Leave | \n", + "F | \n", + "23675 | \n", + "... | \n", + "0.0 | \n", + "7 | \n", + "Personal Auto | \n", + "Personal L2 | \n", + "Offer1 | \n", + "Branch | \n", + "707.925645 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "1 | \n", + "
... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "
10905 | \n", + "FE99816 | \n", + "Nevada | \n", + "15563.369440 | \n", + "No | \n", + "Premium | \n", + "Bachelor | \n", + "2011-01-19 | \n", + "Unemployed | \n", + "F | \n", + "0 | \n", + "... | \n", + "0.0 | \n", + "7 | \n", + "Personal Auto | \n", + "Personal L1 | \n", + "Offer3 | \n", + "Web | \n", + "1214.400000 | \n", + "Luxury Car | \n", + "Medsize | \n", + "1 | \n", + "
10906 | \n", + "KX53892 | \n", + "Oregon | \n", + "5259.444853 | \n", + "No | \n", + "Basic | \n", + "College | \n", + "2011-01-06 | \n", + "Employed | \n", + "F | \n", + "61146 | \n", + "... | \n", + "0.0 | \n", + "6 | \n", + "Personal Auto | \n", + "Personal L3 | \n", + "Offer2 | \n", + "Branch | \n", + "273.018929 | \n", + "Four-Door Car | \n", + "Medsize | \n", + "1 | \n", + "
10907 | \n", + "TL39050 | \n", + "Arizona | \n", + "23893.304100 | \n", + "No | \n", + "Extended | \n", + "Bachelor | \n", + "2011-02-06 | \n", + "Employed | \n", + "F | \n", + "39837 | \n", + "... | \n", + "0.0 | \n", + "2 | \n", + "Corporate Auto | \n", + "Corporate L3 | \n", + "Offer1 | \n", + "Web | \n", + "381.306996 | \n", + "Luxury SUV | \n", + "Medsize | \n", + "1 | \n", + "
10908 | \n", + "WA60547 | \n", + "California | \n", + "11971.977650 | \n", + "No | \n", + "Premium | \n", + "College | \n", + "2011-02-13 | \n", + "Employed | \n", + "F | \n", + "64195 | \n", + "... | \n", + "4.0 | \n", + "6 | \n", + "Personal Auto | \n", + "Personal L1 | \n", + "Offer1 | \n", + "Branch | \n", + "618.288849 | \n", + "SUV | \n", + "Medsize | \n", + "1 | \n", + "
10909 | \n", + "IV32877 | \n", + "California | \n", + "6857.519928 | \n", + "<bound method Series.mode of 0 No\\n1 ... | \n", + "Basic | \n", + "Bachelor | \n", + "2011-01-08 | \n", + "Unemployed | \n", + "M | \n", + "0 | \n", + "... | \n", + "0.0 | \n", + "3 | \n", + "Personal Auto | \n", + "Personal L1 | \n", + "Offer4 | \n", + "Web | \n", + "1021.719397 | \n", + "SUV | \n", + "Medsize | \n", + "1 | \n", + "
10910 rows × 25 columns
\n", + "