Challenge

Project 2 - EDA on Vehicle Insurance Customer Data

Aim : A company has customer data that contains 8 columns of customer details and another table having name customer_policy data contains the policy details of the customer. The company intends to offer some discount in premium for certain customers. To do that they ask their Data scientist team to get some information. Hence, following tasks DS team decided to perform:

  1. Add the column names to both datasets:
  2. Checking and Cleaning Data Quality:
  3. Create a Master table for future use.
  4. Company needs some important information from the master table to make decisions for future growth.They needs following information:
  5. Is there any relation between Person Age and annual premium

The Program is written as follows:

  • rename({'0':'Customer_Id','1':'Gender','2':'Age','3':'Driving Licence Present','4':'Region Code','5':'Previously Insured','6':'Vehicle Age','7':'Vehicle Damage'},axis=1,inplace=True).

customer_details.head()

2) i. Null values

customer_details.isna().sum()

ii. Outliers

q1=customer_policy_details.quantile(0.25)

q3=customer_policy_details.quantile(0.75)

iqr=q3-q1

l=q1-(1.5*iqr)

u=q3+(1.5*iqr)

((customer_policy_details<l)|(customer_policy_details>u)).sum()

3) master_table=pd.merge(customer_details,customer_policy_details)

master_table['Age']=master_table['Age'].astype('int')

master_table

4) master_table.groupby(['Gender'])['Annual Premium(Rs)'].mean()

5) np.corrcoef(master_table['Age'],master_table['Annual Premium(Rs)'])

import numpy_financial as npf

out = npf.fv(rate = 100,nper= 20, pmt =0, pv= -1)

print(out)

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.