Challenge

Project 2 - EDA on Vehicle Insurance Customer Data

Ans-1 Add the column names to both datasets:

i. Column Name for customer details table: customer_id,Gender,age,driving licence present,region code,previously insured,vehicle age and vehicle damage, in respective order.

ii - Column Name for customer_policy table: customer_id,annual premium (in Rs),sales channel code,vintage and response.

Ans-2 Checking and Cleaning Data Quality:

i. Null values - Generate a summary of count of all the null values column wise Drop Null values for customer_id because central tendencies for id’s is not feasible.

Replace all null values for numeric columns by mean.

Replace all null values for Categorical value by mode.

i. Outliers -Generate a summary of count of all the outliers column wise Replace all outlier values for numeric columns by mean.

For example: for a column X calculate Q1 = 25th percentile and Q3 = 75th percentile then IQR = Q3 – Q1 ) then to check outlier, anything lower than a Q1 – 1.5IQR or greater than Q3 + 1.5 IQR would be an outlier Hint2: For getting percentile value, explore pd.describe() function)

iii. White spaces - Remove white spacesiv. case correction(lower or upper, any one)

iv. case correction(lower or upper, any one)

v. Convert nominal data (categorical) into dummies for future modeling use if required

vi. Drop Duplicates (duplicated rows)Ans-3 Create a Master table for future use. Join the customer table and customer_policy table to get a master table using customer_id in both tables.

Ans-3 Create a Master table for future use. Join the customer table and customer_policy table to get a master table using customer_id in both tables.(Hint: use pd.merge() function)

Ans-4 Company needs some important information from the master table to make decisions for future growth.They needs following information:

i. Gender wise average annual premium

ii. Age wise average annual premium

iii. Is your data balanced between the genders?(Hint: Data is balanced if number of counts in each group is approximately same)

iv. Vehicle age wise average annual premium.

Ans-5 Is there any relation between Person Age and annual premium?Hint: use correlation function (Correlation describes the relationship between two variables).

- Correlation coefficient < -0.5 - Strong negative relationship

- Correlation coefficient > 0.5 - Strong positive relationship

- 0.5 < Correlation coefficient < 0.5 - There is no relationship.

All THE ANSWERS ARE AS IN BELOW FILE IN ATTACHMENT :

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.