Challenge

Project 2 - EDA on Vehicle Insurance Customer Data

1. I have assigned column names to two datasets as follows: For the customer details table, the columns are customer_id, Gender, age, driving licence present, region code, previously insured, vehicle age, and vehicle damage. For the customer_policy table, the columns are customer_id, annual premium (in Rs), sales channel code, vintage, and response.

2. To ensure data quality:

i. Summary counts of null values are generated column-wise. Null values in the 'customer_id' column are dropped due to the infeasibility of central tendencies for IDs. For numeric columns, null values are replaced with the mean, while for categorical values, nulls are replaced with the mode.

ii. A summary count of outliers is generated column-wise. Outlier values in numeric columns are replaced with the mean. Outliers are identified using the Interquartile Range (IQR) method, where values below Q1 - 1.5IQR or above Q3 + 1.5IQR where considered outliers.

iii. White spaces where removed from the data.

iv. Case correction (lower or upper) is applied to the data.

v. Nominal data (categorical) is converted into dummy variables for potential future modeling use.

vi. Duplicate rows are dropped from the dataset.

3. To create a Master table for future use, I utilized the `pd.merge()` function to join the customer table and customer_policy table based on the 'customer_id' column present in both tables. This resulted in a comprehensive Master table containing combined information from both datasets.

4.

i. created average annual premium categorized by gender.

ii. created average annual premium categorized by age.

iii. checked whether the data is balanced between genders. Data is considered balanced if the number of counts in each gender group is approximately the same.

iv. did average annual premium categorized by vehicle age.

5. To explore the relationship between Person Age and annual premium, used calculate the correlation coefficient. If the correlation coefficient is:

- Less than -0.5, it indicates a strong negative relationship.

- Greater than 0.5, it indicates a strong positive relationship.

- Between -0.5 and 0.5, there is no significant relationship.

used a correlation function to determine this relationship.

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.