|
20 | 20 | },
|
21 | 21 | {
|
22 | 22 | "cell_type": "code",
|
23 |
| - "execution_count": 13, |
| 23 | + "execution_count": 1, |
24 | 24 | "metadata": {},
|
25 | 25 | "outputs": [],
|
26 | 26 | "source": [
|
|
40 | 40 | },
|
41 | 41 | {
|
42 | 42 | "cell_type": "code",
|
43 |
| - "execution_count": 14, |
| 43 | + "execution_count": 2, |
44 | 44 | "metadata": {},
|
45 | 45 | "outputs": [
|
46 | 46 | {
|
47 | 47 | "data": {
|
48 | 48 | "text/plain": [
|
49 |
| - "(614, 15)" |
| 49 | + "(614, 14)" |
50 | 50 | ]
|
51 | 51 | },
|
52 |
| - "execution_count": 14, |
| 52 | + "execution_count": 2, |
53 | 53 | "metadata": {},
|
54 | 54 | "output_type": "execute_result"
|
55 | 55 | }
|
|
69 | 69 | },
|
70 | 70 | {
|
71 | 71 | "cell_type": "code",
|
72 |
| - "execution_count": 15, |
| 72 | + "execution_count": 3, |
73 | 73 | "metadata": {},
|
74 | 74 | "outputs": [],
|
75 | 75 | "source": [
|
|
97 | 97 | "total_income = df_fill['ApplicantIncome'] + df_fill['CoapplicantIncome']\n",
|
98 | 98 | "remaining_income = (total_income - base_loan_installment) / total_income\n",
|
99 | 99 | "\n",
|
100 |
| - "married = df_import['Married'].copy()\n", |
101 |
| - "married[married == 'Yes'] = 1\n", |
102 |
| - "married[married == 'No'] = 0\n", |
103 |
| - "\n", |
104 |
| - "dependents = df_import['Dependents'].copy()\n", |
105 |
| - "dependents[dependents == '0'] = 0\n", |
106 |
| - "dependents[dependents == '1'] = 1\n", |
107 |
| - "dependents[dependents == '2'] = 2\n", |
108 |
| - "dependents[dependents == '3+'] = 3\n", |
109 |
| - "\n", |
110 |
| - "\n", |
111 |
| - "people_in_house = dependents + married + 1\n", |
112 |
| - "household_percapita = (total_income / people_in_house).astype(float)\n", |
113 |
| - "household_percapita.describe()\n", |
| 100 | + "# married = df_import['Married'].copy()\n", |
| 101 | + "# married[married == 'Yes'] = 1\n", |
| 102 | + "# married[married == 'No'] = 0\n", |
| 103 | + "# dependents = df_import['Dependents'].copy()\n", |
| 104 | + "# dependents[dependents == '0'] = 0\n", |
| 105 | + "# dependents[dependents == '1'] = 1\n", |
| 106 | + "# dependents[dependents == '2'] = 2\n", |
| 107 | + "# dependents[dependents == '3+'] = 3\n", |
| 108 | + "# people_in_house = dependents + married + 1\n", |
| 109 | + "# household_percapita = (total_income / people_in_house).astype(float)\n", |
| 110 | + "# household_percapita.describe()\n", |
114 | 111 | "\n",
|
115 | 112 | "\n",
|
116 | 113 | "df_fill['Base_Loan_Installment'] = base_loan_installment\n",
|
117 |
| - "df_fill['Remaining_Income'] = remaining_income" |
| 114 | + "df_fill['Remaining_Income'] = remaining_income\n", |
| 115 | + "# df_fill['HouseHold_Percapita'] = household_percapita" |
118 | 116 | ]
|
119 | 117 | },
|
120 | 118 | {
|
|
0 commit comments