{ "cells": [ { "cell_type": "code", "execution_count": null, "id": "aware-aberdeen", "metadata": {}, "outputs": [], "source": [ "# ~/.local/bin/kaggle datasets download -d tejashvi14/travel-insurance-prediction-data\n", "!kaggle datasets download -d tejashvi14/travel-insurance-prediction-data" ] }, { "cell_type": "code", "execution_count": null, "id": "flexible-representation", "metadata": {}, "outputs": [], "source": [ "!unzip -o travel-insurance-prediction-data.zip" ] }, { "cell_type": "code", "execution_count": 5, "id": "former-testing", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | Age | \n", "Employment Type | \n", "GraduateOrNot | \n", "AnnualIncome | \n", "FamilyMembers | \n", "ChronicDiseases | \n", "FrequentFlyer | \n", "EverTravelledAbroad | \n", "TravelInsurance | \n", "
---|---|---|---|---|---|---|---|---|---|
0 | \n", "31 | \n", "Government Sector | \n", "Yes | \n", "400000 | \n", "6 | \n", "1 | \n", "No | \n", "No | \n", "0 | \n", "
1 | \n", "31 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "1250000 | \n", "7 | \n", "0 | \n", "No | \n", "No | \n", "0 | \n", "
2 | \n", "34 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "500000 | \n", "4 | \n", "1 | \n", "No | \n", "No | \n", "1 | \n", "
3 | \n", "28 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "700000 | \n", "3 | \n", "1 | \n", "No | \n", "No | \n", "0 | \n", "
4 | \n", "28 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "700000 | \n", "8 | \n", "1 | \n", "Yes | \n", "No | \n", "0 | \n", "
5 | \n", "25 | \n", "Private Sector/Self Employed | \n", "No | \n", "1150000 | \n", "4 | \n", "0 | \n", "No | \n", "No | \n", "0 | \n", "
6 | \n", "31 | \n", "Government Sector | \n", "Yes | \n", "1300000 | \n", "4 | \n", "0 | \n", "No | \n", "No | \n", "0 | \n", "
7 | \n", "31 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "1350000 | \n", "3 | \n", "0 | \n", "Yes | \n", "Yes | \n", "1 | \n", "
8 | \n", "28 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "1450000 | \n", "6 | \n", "1 | \n", "Yes | \n", "Yes | \n", "1 | \n", "
9 | \n", "33 | \n", "Government Sector | \n", "Yes | \n", "800000 | \n", "3 | \n", "0 | \n", "Yes | \n", "No | \n", "0 | \n", "
10 | \n", "31 | \n", "Government Sector | \n", "Yes | \n", "400000 | \n", "9 | \n", "1 | \n", "No | \n", "No | \n", "0 | \n", "
11 | \n", "26 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "1400000 | \n", "5 | \n", "0 | \n", "Yes | \n", "Yes | \n", "1 | \n", "
12 | \n", "32 | \n", "Government Sector | \n", "Yes | \n", "850000 | \n", "6 | \n", "0 | \n", "No | \n", "No | \n", "1 | \n", "
13 | \n", "31 | \n", "Government Sector | \n", "Yes | \n", "1500000 | \n", "6 | \n", "0 | \n", "Yes | \n", "Yes | \n", "1 | \n", "
14 | \n", "31 | \n", "Government Sector | \n", "Yes | \n", "400000 | \n", "3 | \n", "0 | \n", "No | \n", "No | \n", "0 | \n", "
15 | \n", "34 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "700000 | \n", "7 | \n", "0 | \n", "No | \n", "No | \n", "0 | \n", "
16 | \n", "28 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "1150000 | \n", "4 | \n", "1 | \n", "No | \n", "No | \n", "0 | \n", "
17 | \n", "28 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "800000 | \n", "7 | \n", "0 | \n", "No | \n", "No | \n", "1 | \n", "
18 | \n", "29 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "1050000 | \n", "5 | \n", "1 | \n", "No | \n", "No | \n", "1 | \n", "
19 | \n", "34 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "1500000 | \n", "2 | \n", "0 | \n", "Yes | \n", "Yes | \n", "1 | \n", "
20 | \n", "28 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "1150000 | \n", "6 | \n", "0 | \n", "Yes | \n", "No | \n", "0 | \n", "
21 | \n", "29 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "350000 | \n", "3 | \n", "0 | \n", "No | \n", "No | \n", "1 | \n", "
22 | \n", "31 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "1100000 | \n", "4 | \n", "0 | \n", "No | \n", "No | \n", "0 | \n", "
23 | \n", "28 | \n", "Government Sector | \n", "Yes | \n", "600000 | \n", "9 | \n", "0 | \n", "No | \n", "No | \n", "1 | \n", "
24 | \n", "31 | \n", "Government Sector | \n", "Yes | \n", "1500000 | \n", "7 | \n", "0 | \n", "Yes | \n", "Yes | \n", "0 | \n", "
25 | \n", "35 | \n", "Private Sector/Self Employed | \n", "No | \n", "800000 | \n", "4 | \n", "0 | \n", "No | \n", "Yes | \n", "0 | \n", "
26 | \n", "34 | \n", "Private Sector/Self Employed | \n", "No | \n", "1300000 | \n", "6 | \n", "0 | \n", "Yes | \n", "No | \n", "1 | \n", "
27 | \n", "28 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "1250000 | \n", "2 | \n", "0 | \n", "Yes | \n", "No | \n", "0 | \n", "
28 | \n", "26 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "600000 | \n", "4 | \n", "0 | \n", "Yes | \n", "No | \n", "0 | \n", "
29 | \n", "31 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "900000 | \n", "3 | \n", "0 | \n", "No | \n", "No | \n", "0 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
1957 | \n", "31 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "1250000 | \n", "7 | \n", "0 | \n", "No | \n", "No | \n", "0 | \n", "
1958 | \n", "31 | \n", "Government Sector | \n", "Yes | \n", "1300000 | \n", "3 | \n", "1 | \n", "No | \n", "No | \n", "0 | \n", "
1959 | \n", "28 | \n", "Private Sector/Self Employed | \n", "No | \n", "550000 | \n", "6 | \n", "0 | \n", "No | \n", "No | \n", "0 | \n", "
1960 | \n", "28 | \n", "Government Sector | \n", "Yes | \n", "300000 | \n", "6 | \n", "0 | \n", "No | \n", "No | \n", "1 | \n", "
1961 | \n", "26 | \n", "Government Sector | \n", "Yes | \n", "500000 | \n", "3 | \n", "0 | \n", "No | \n", "No | \n", "0 | \n", "
1962 | \n", "25 | \n", "Private Sector/Self Employed | \n", "No | \n", "1150000 | \n", "7 | \n", "0 | \n", "No | \n", "No | \n", "0 | \n", "
1963 | \n", "33 | \n", "Government Sector | \n", "Yes | \n", "1100000 | \n", "4 | \n", "0 | \n", "No | \n", "No | \n", "1 | \n", "
1964 | \n", "28 | \n", "Government Sector | \n", "Yes | \n", "1100000 | \n", "4 | \n", "0 | \n", "No | \n", "No | \n", "0 | \n", "
1965 | \n", "30 | \n", "Private Sector/Self Employed | \n", "No | \n", "550000 | \n", "3 | \n", "0 | \n", "No | \n", "No | \n", "1 | \n", "
1966 | \n", "34 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "700000 | \n", "3 | \n", "0 | \n", "Yes | \n", "No | \n", "0 | \n", "
1967 | \n", "34 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "700000 | \n", "3 | \n", "1 | \n", "No | \n", "No | \n", "0 | \n", "
1968 | \n", "28 | \n", "Government Sector | \n", "Yes | \n", "300000 | \n", "5 | \n", "1 | \n", "No | \n", "No | \n", "0 | \n", "
1969 | \n", "31 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "500000 | \n", "4 | \n", "1 | \n", "No | \n", "No | \n", "0 | \n", "
1970 | \n", "29 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "500000 | \n", "4 | \n", "0 | \n", "No | \n", "No | \n", "1 | \n", "
1971 | \n", "31 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "950000 | \n", "5 | \n", "0 | \n", "No | \n", "No | \n", "0 | \n", "
1972 | \n", "28 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "800000 | \n", "5 | \n", "1 | \n", "No | \n", "No | \n", "0 | \n", "
1973 | \n", "31 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "1350000 | \n", "3 | \n", "0 | \n", "No | \n", "Yes | \n", "1 | \n", "
1974 | \n", "28 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "1200000 | \n", "6 | \n", "0 | \n", "Yes | \n", "No | \n", "0 | \n", "
1975 | \n", "26 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "1400000 | \n", "9 | \n", "0 | \n", "No | \n", "Yes | \n", "1 | \n", "
1976 | \n", "32 | \n", "Government Sector | \n", "Yes | \n", "900000 | \n", "6 | \n", "0 | \n", "No | \n", "No | \n", "0 | \n", "
1977 | \n", "25 | \n", "Private Sector/Self Employed | \n", "No | \n", "1350000 | \n", "6 | \n", "0 | \n", "No | \n", "Yes | \n", "1 | \n", "
1978 | \n", "34 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "700000 | \n", "5 | \n", "0 | \n", "No | \n", "No | \n", "1 | \n", "
1979 | \n", "28 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "1100000 | \n", "4 | \n", "1 | \n", "No | \n", "No | \n", "0 | \n", "
1980 | \n", "25 | \n", "Private Sector/Self Employed | \n", "No | \n", "1150000 | \n", "5 | \n", "1 | \n", "No | \n", "No | \n", "0 | \n", "
1981 | \n", "27 | \n", "Government Sector | \n", "Yes | \n", "850000 | \n", "3 | \n", "0 | \n", "No | \n", "No | \n", "1 | \n", "
1982 | \n", "33 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "1500000 | \n", "4 | \n", "0 | \n", "Yes | \n", "Yes | \n", "1 | \n", "
1983 | \n", "28 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "1750000 | \n", "5 | \n", "1 | \n", "No | \n", "Yes | \n", "0 | \n", "
1984 | \n", "28 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "1150000 | \n", "6 | \n", "1 | \n", "No | \n", "No | \n", "0 | \n", "
1985 | \n", "34 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "1000000 | \n", "6 | \n", "0 | \n", "Yes | \n", "Yes | \n", "1 | \n", "
1986 | \n", "34 | \n", "Private Sector/Self Employed | \n", "Yes | \n", "500000 | \n", "4 | \n", "0 | \n", "No | \n", "No | \n", "0 | \n", "
1987 rows × 9 columns
\n", "\n", " | Age | \n", "Employment Type | \n", "GraduateOrNot | \n", "AnnualIncome | \n", "FamilyMembers | \n", "ChronicDiseases | \n", "FrequentFlyer | \n", "EverTravelledAbroad | \n", "TravelInsurance | \n", "
---|---|---|---|---|---|---|---|---|---|
0 | \n", "31 | \n", "government sector | \n", "yes | \n", "400000 | \n", "6 | \n", "1 | \n", "no | \n", "no | \n", "0 | \n", "
1 | \n", "31 | \n", "private sector/self employed | \n", "yes | \n", "1250000 | \n", "7 | \n", "0 | \n", "no | \n", "no | \n", "0 | \n", "
2 | \n", "34 | \n", "private sector/self employed | \n", "yes | \n", "500000 | \n", "4 | \n", "1 | \n", "no | \n", "no | \n", "1 | \n", "
3 | \n", "28 | \n", "private sector/self employed | \n", "yes | \n", "700000 | \n", "3 | \n", "1 | \n", "no | \n", "no | \n", "0 | \n", "
4 | \n", "28 | \n", "private sector/self employed | \n", "yes | \n", "700000 | \n", "8 | \n", "1 | \n", "yes | \n", "no | \n", "0 | \n", "
5 | \n", "25 | \n", "private sector/self employed | \n", "no | \n", "1150000 | \n", "4 | \n", "0 | \n", "no | \n", "no | \n", "0 | \n", "
6 | \n", "31 | \n", "government sector | \n", "yes | \n", "1300000 | \n", "4 | \n", "0 | \n", "no | \n", "no | \n", "0 | \n", "
7 | \n", "31 | \n", "private sector/self employed | \n", "yes | \n", "1350000 | \n", "3 | \n", "0 | \n", "yes | \n", "yes | \n", "1 | \n", "
8 | \n", "28 | \n", "private sector/self employed | \n", "yes | \n", "1450000 | \n", "6 | \n", "1 | \n", "yes | \n", "yes | \n", "1 | \n", "
9 | \n", "33 | \n", "government sector | \n", "yes | \n", "800000 | \n", "3 | \n", "0 | \n", "yes | \n", "no | \n", "0 | \n", "
10 | \n", "31 | \n", "government sector | \n", "yes | \n", "400000 | \n", "9 | \n", "1 | \n", "no | \n", "no | \n", "0 | \n", "
11 | \n", "26 | \n", "private sector/self employed | \n", "yes | \n", "1400000 | \n", "5 | \n", "0 | \n", "yes | \n", "yes | \n", "1 | \n", "
12 | \n", "32 | \n", "government sector | \n", "yes | \n", "850000 | \n", "6 | \n", "0 | \n", "no | \n", "no | \n", "1 | \n", "
13 | \n", "31 | \n", "government sector | \n", "yes | \n", "1500000 | \n", "6 | \n", "0 | \n", "yes | \n", "yes | \n", "1 | \n", "
14 | \n", "31 | \n", "government sector | \n", "yes | \n", "400000 | \n", "3 | \n", "0 | \n", "no | \n", "no | \n", "0 | \n", "
15 | \n", "34 | \n", "private sector/self employed | \n", "yes | \n", "700000 | \n", "7 | \n", "0 | \n", "no | \n", "no | \n", "0 | \n", "
16 | \n", "28 | \n", "private sector/self employed | \n", "yes | \n", "1150000 | \n", "4 | \n", "1 | \n", "no | \n", "no | \n", "0 | \n", "
17 | \n", "28 | \n", "private sector/self employed | \n", "yes | \n", "800000 | \n", "7 | \n", "0 | \n", "no | \n", "no | \n", "1 | \n", "
18 | \n", "29 | \n", "private sector/self employed | \n", "yes | \n", "1050000 | \n", "5 | \n", "1 | \n", "no | \n", "no | \n", "1 | \n", "
19 | \n", "34 | \n", "private sector/self employed | \n", "yes | \n", "1500000 | \n", "2 | \n", "0 | \n", "yes | \n", "yes | \n", "1 | \n", "
20 | \n", "28 | \n", "private sector/self employed | \n", "yes | \n", "1150000 | \n", "6 | \n", "0 | \n", "yes | \n", "no | \n", "0 | \n", "
21 | \n", "29 | \n", "private sector/self employed | \n", "yes | \n", "350000 | \n", "3 | \n", "0 | \n", "no | \n", "no | \n", "1 | \n", "
22 | \n", "31 | \n", "private sector/self employed | \n", "yes | \n", "1100000 | \n", "4 | \n", "0 | \n", "no | \n", "no | \n", "0 | \n", "
23 | \n", "28 | \n", "government sector | \n", "yes | \n", "600000 | \n", "9 | \n", "0 | \n", "no | \n", "no | \n", "1 | \n", "
24 | \n", "31 | \n", "government sector | \n", "yes | \n", "1500000 | \n", "7 | \n", "0 | \n", "yes | \n", "yes | \n", "0 | \n", "
25 | \n", "35 | \n", "private sector/self employed | \n", "no | \n", "800000 | \n", "4 | \n", "0 | \n", "no | \n", "yes | \n", "0 | \n", "
26 | \n", "34 | \n", "private sector/self employed | \n", "no | \n", "1300000 | \n", "6 | \n", "0 | \n", "yes | \n", "no | \n", "1 | \n", "
27 | \n", "28 | \n", "private sector/self employed | \n", "yes | \n", "1250000 | \n", "2 | \n", "0 | \n", "yes | \n", "no | \n", "0 | \n", "
28 | \n", "26 | \n", "private sector/self employed | \n", "yes | \n", "600000 | \n", "4 | \n", "0 | \n", "yes | \n", "no | \n", "0 | \n", "
29 | \n", "31 | \n", "private sector/self employed | \n", "yes | \n", "900000 | \n", "3 | \n", "0 | \n", "no | \n", "no | \n", "0 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
1957 | \n", "31 | \n", "private sector/self employed | \n", "yes | \n", "1250000 | \n", "7 | \n", "0 | \n", "no | \n", "no | \n", "0 | \n", "
1958 | \n", "31 | \n", "government sector | \n", "yes | \n", "1300000 | \n", "3 | \n", "1 | \n", "no | \n", "no | \n", "0 | \n", "
1959 | \n", "28 | \n", "private sector/self employed | \n", "no | \n", "550000 | \n", "6 | \n", "0 | \n", "no | \n", "no | \n", "0 | \n", "
1960 | \n", "28 | \n", "government sector | \n", "yes | \n", "300000 | \n", "6 | \n", "0 | \n", "no | \n", "no | \n", "1 | \n", "
1961 | \n", "26 | \n", "government sector | \n", "yes | \n", "500000 | \n", "3 | \n", "0 | \n", "no | \n", "no | \n", "0 | \n", "
1962 | \n", "25 | \n", "private sector/self employed | \n", "no | \n", "1150000 | \n", "7 | \n", "0 | \n", "no | \n", "no | \n", "0 | \n", "
1963 | \n", "33 | \n", "government sector | \n", "yes | \n", "1100000 | \n", "4 | \n", "0 | \n", "no | \n", "no | \n", "1 | \n", "
1964 | \n", "28 | \n", "government sector | \n", "yes | \n", "1100000 | \n", "4 | \n", "0 | \n", "no | \n", "no | \n", "0 | \n", "
1965 | \n", "30 | \n", "private sector/self employed | \n", "no | \n", "550000 | \n", "3 | \n", "0 | \n", "no | \n", "no | \n", "1 | \n", "
1966 | \n", "34 | \n", "private sector/self employed | \n", "yes | \n", "700000 | \n", "3 | \n", "0 | \n", "yes | \n", "no | \n", "0 | \n", "
1967 | \n", "34 | \n", "private sector/self employed | \n", "yes | \n", "700000 | \n", "3 | \n", "1 | \n", "no | \n", "no | \n", "0 | \n", "
1968 | \n", "28 | \n", "government sector | \n", "yes | \n", "300000 | \n", "5 | \n", "1 | \n", "no | \n", "no | \n", "0 | \n", "
1969 | \n", "31 | \n", "private sector/self employed | \n", "yes | \n", "500000 | \n", "4 | \n", "1 | \n", "no | \n", "no | \n", "0 | \n", "
1970 | \n", "29 | \n", "private sector/self employed | \n", "yes | \n", "500000 | \n", "4 | \n", "0 | \n", "no | \n", "no | \n", "1 | \n", "
1971 | \n", "31 | \n", "private sector/self employed | \n", "yes | \n", "950000 | \n", "5 | \n", "0 | \n", "no | \n", "no | \n", "0 | \n", "
1972 | \n", "28 | \n", "private sector/self employed | \n", "yes | \n", "800000 | \n", "5 | \n", "1 | \n", "no | \n", "no | \n", "0 | \n", "
1973 | \n", "31 | \n", "private sector/self employed | \n", "yes | \n", "1350000 | \n", "3 | \n", "0 | \n", "no | \n", "yes | \n", "1 | \n", "
1974 | \n", "28 | \n", "private sector/self employed | \n", "yes | \n", "1200000 | \n", "6 | \n", "0 | \n", "yes | \n", "no | \n", "0 | \n", "
1975 | \n", "26 | \n", "private sector/self employed | \n", "yes | \n", "1400000 | \n", "9 | \n", "0 | \n", "no | \n", "yes | \n", "1 | \n", "
1976 | \n", "32 | \n", "government sector | \n", "yes | \n", "900000 | \n", "6 | \n", "0 | \n", "no | \n", "no | \n", "0 | \n", "
1977 | \n", "25 | \n", "private sector/self employed | \n", "no | \n", "1350000 | \n", "6 | \n", "0 | \n", "no | \n", "yes | \n", "1 | \n", "
1978 | \n", "34 | \n", "private sector/self employed | \n", "yes | \n", "700000 | \n", "5 | \n", "0 | \n", "no | \n", "no | \n", "1 | \n", "
1979 | \n", "28 | \n", "private sector/self employed | \n", "yes | \n", "1100000 | \n", "4 | \n", "1 | \n", "no | \n", "no | \n", "0 | \n", "
1980 | \n", "25 | \n", "private sector/self employed | \n", "no | \n", "1150000 | \n", "5 | \n", "1 | \n", "no | \n", "no | \n", "0 | \n", "
1981 | \n", "27 | \n", "government sector | \n", "yes | \n", "850000 | \n", "3 | \n", "0 | \n", "no | \n", "no | \n", "1 | \n", "
1982 | \n", "33 | \n", "private sector/self employed | \n", "yes | \n", "1500000 | \n", "4 | \n", "0 | \n", "yes | \n", "yes | \n", "1 | \n", "
1983 | \n", "28 | \n", "private sector/self employed | \n", "yes | \n", "1750000 | \n", "5 | \n", "1 | \n", "no | \n", "yes | \n", "0 | \n", "
1984 | \n", "28 | \n", "private sector/self employed | \n", "yes | \n", "1150000 | \n", "6 | \n", "1 | \n", "no | \n", "no | \n", "0 | \n", "
1985 | \n", "34 | \n", "private sector/self employed | \n", "yes | \n", "1000000 | \n", "6 | \n", "0 | \n", "yes | \n", "yes | \n", "1 | \n", "
1986 | \n", "34 | \n", "private sector/self employed | \n", "yes | \n", "500000 | \n", "4 | \n", "0 | \n", "no | \n", "no | \n", "0 | \n", "
1987 rows × 9 columns
\n", "