Challenge

Project 2 - EDA on Vehicle Insurance Customer Data

0 1 2 3 4 5 6 7 0 1.0 Male 44.0 1.0 28.0 0.0 > 2 Years Yes 1 2.0 Male 76.0 1.0 3.0 0.0 1-2 Year No 2 3.0 Male 47.0 1.0 28.0 0.0 > 2 Years Yes 3 4.0 Male 21.0 1.0 11.0 1.0 < 1 Year No 4 5.0 Female 29.0 1.0 41.0 1.0 < 1 Year No 0 1 2 3 4 0 1.0 40454.0 26.0 217.0 1.0 1 2.0 33536.0 26.0 183.0 0.0 2 3.0 38294.0 26.0 27.0 1.0 3 4.0 28619.0 152.0 203.0 0.0 4 5.0 27496.0 152.0 39.0 0.0

number of cells of customer_id with null values = 386 number of cells of gender with null values = 368 number of cells of age with null values = 368 number of cells of driving_licence_presence with null values = 393 number of cells of region_code with null values = 392 number of cells of previously_insured with null values = 381 number of cells of vehicle_age with null values = 381 number of cells of vehicle_damage with null values = 407 <class 'pandas.core.frame.DataFrame'> RangeIndex: 381109 entries, 0 to 381108 Data columns (total 8 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 0 380723 non-null float64 1 1 380741 non-null object 2 2 380741 non-null float64 3 3 380716 non-null float64 4 4 380717 non-null float64 5 5 380728 non-null float64 6 6 380728 non-null object 7 7 380702 non-null object dtypes: float64(5), object(3) memory usage: 23.3+ MB

number of cells of customer_id with null values=0
number of cells of age with null values = 0 number of cells of driving_licence_presence with null values = 0 number of cells of region_code with null values = 0 number of cells of previously_insured with null values = 0
number of cells of gender with null values = 0 number of cells of vehicle_age with null values = 0 number of cells of vehicle_damage with null values = 0
 
number of cells of customer_id with null values is 387 number of cells of annual_premium_INR with null values is 346 number of cells of sales_channel_code with null values is 400 number of cells of vintage with null values is 388 number of cells of response with null values is 361 <class 'pandas.core.frame.DataFrame'> RangeIndex: 381109 entries, 0 to 381108 Data columns (total 5 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 0 380722 non-null float64 1 1 380763 non-null float64 2 2 380709 non-null float64 3 3 380721 non-null float64 4 4 380748 non-null float64 dtypes: float64(5) memory usage: 14.5 MB
number of cells of customer_id with null values = 0
number of cells of age with null values = 0 number of cells of driving_licence_presence with null values = 0 number of cells of region_code with null values = 0 number of cells of previously_insured with null values = 0
{'2': (-11.0, 85.0), '3': (1.0, 1.0), '4': (-15.0, 65.0), '5': (-1.5, 2.5)}
{'2': 0, '3': 0, '4': 0, '5': 0, '6': 0}
{'1': (1952.375, 61855.375), '2': (-155.5, 336.5), '3': (-135.5, 444.5), '4': (0.0, 0.0)}
{'1': 10332, '2': 0, '3': 0, '4': 0, '5': 0}
0 1 2 3 4 5 6 7
0 1.0 Male 44.0 1.0 28.0 0.0 > 2 Years Yes
1 2.0 Male 76.0 1.0 3.0 0.0 1-2 Year No
2 3.0 Male 47.0 1.0 28.0 0.0 > 2 Years Yes
3 4.0 Male 21.0 1.0 11.0 1.0 < 1 Year No
4 5.0 Female 29.0 1.0 41.0 1.0 < 1 Year No
... ... ... ... ... ... ... ... ...
381104 381105.0 Male 74.0 1.0 26.0 1.0 1-2 Year No
381105 381106.0 Male 30.0 1.0 37.0 1.0 < 1 Year No
381106 381107.0 Male 21.0 1.0 30.0 1.0 < 1 Year No
381107 381108.0 Female 68.0 1.0 14.0 0.0 > 2 Years Yes
381108 381109.0 Male 46.0 1.0 29.0 0.0 1-2 Year No

380723 rows × 8 columns

0 1 2 3 4
0 1.0 40454.0 26.0 217.0 0.122526
1 2.0 33536.0 26.0 183.0 0.000000
2 3.0 38294.0 26.0 27.0 0.122523
3 4.0 28619.0 152.0 203.0 0.000000
4 5.0 27496.0 152.0 39.0 0.000000
... ... ... ... ... ...
381104 381105.0 30170.0 26.0 88.0 0.000000
381105 381106.0 40016.0 152.0 131.0 0.000000
381106 381107.0 35118.0 160.0 161.0 0.000000
381107 381108.0 44617.0 124.0 74.0 0.000000
381108 381109.0 41777.0 26.0 237.0 0.000000

380722 rows × 5 columns

0 1 2 3 4 5 6 7
0 1.0 male 44.0 1.0 28.0 0.0 > 2 years yes
1 2.0 male 76.0 1.0 3.0 0.0 1-2 year no
2 3.0 male 47.0 1.0 28.0 0.0 > 2 years yes
3 4.0 male 21.0 1.0 11.0 1.0 < 1 year no
4 5.0 female 29.0 1.0 41.0 1.0 < 1 year no
... ... ... ... ... ... ... ... ...
381104 381105.0 male 74.0 1.0 26.0 1.0 1-2 year no
381105 381106.0 male 30.0 1.0 37.0 1.0 < 1 year no
381106 381107.0 male 21.0 1.0 30.0 1.0 < 1 year no
381107 381108.0 female 68.0 1.0 14.0 0.0 > 2 years yes
381108 381109.0 male 46.0 1.0 29.0 0.0 1-2 year no

380723 rows × 8 columns

0 1 2 3 4
0 1.0 40454.0 26.0 217.0 0.122526
1 2.0 33536.0 26.0 183.0 0.000000
2 3.0 38294.0 26.0 27.0 0.122523
3 4.0 28619.0 152.0 203.0 0.000000
4 5.0 27496.0 152.0 39.0 0.000000
... ... ... ... ... ...
381104 381105.0 30170.0 26.0 88.0 0.000000
381105 381106.0 40016.0 152.0 131.0 0.000000
381106 381107.0 35118.0 160.0 161.0 0.000000
381107 381108.0 44617.0 124.0 74.0 0.000000
381108 381109.0 41777.0 26.0 237.0 0.000000

380722 rows × 5 columns

3.

customer_id gender age driving_license_presence region_code previously_insured vehicle_age vehicle_damage annual_premium_INR sales_channel_code vintage response
0 1.0 Male 44.0 1.0 28.0 0.0 > 2 Years Yes 40454.0 26.0 217.0 0.122526
1 2.0 Male 76.0 1.0 3.0 0.0 1-2 Year No 33536.0 26.0 183.0 0.000000
2 3.0 Male 47.0 1.0 28.0 0.0 > 2 Years Yes 38294.0 26.0 27.0 0.122523
3 4.0 Male 21.0 1.0 11.0 1.0 < 1 Year No 28619.0 152.0 203.0 0.000000
4 5.0 Female 29.0 1.0 41.0 1.0 < 1 Year No 27496.0 152.0 39.0 0.000000
... ... ... ... ... ... ... ... ... ... ... ... ...
380331 381105.0 Male 74.0 1.0 26.0 1.0 1-2 Year No 30170.0 26.0 88.0 0.000000
380332 381106.0 Male 30.0 1.0 37.0 1.0 < 1 Year No 40016.0 152.0 131.0 0.000000
380333 381107.0 Male 21.0 1.0 30.0 1.0 < 1 Year No 35118.0 160.0 161.0 0.000000
380334 381108.0 Female 68.0 1.0 14.0 0.0 > 2 Years Yes 44617.0 124.0 74.0 0.000000
380335 381109.0 Male 46.0 1.0 29.0 0.0 1-2 Year No 41777.0 26.0 237.0 0.000000

380336 rows × 12 columns

4.1

4.2

4

4.3male to female ration is 1.18 generally, the standard is: balanced data ratio: 1.0 slightly balanced data ratio: 1.22-1.5 imbalanced data ratio: 4.0-9.0

4.4

5.There is no 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.