Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
div by 0
  • Loading branch information
mark-glinberg committed Dec 5, 2023
1 parent 76ef0a0 commit bd24d9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/data-processing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
" \"PRODUCT_COMBINATION\", \"DAYS_FIRST_DRAWING\", \"DAYS_FIRST_DUE\", \"DAYS_LAST_DUE_1ST_VERSION\", \"DAYS_LAST_DUE\", \"DAYS_TERMINATION\"], inplace=True)\n",
"prev = prev[prev[\"NAME_CONTRACT_STATUS\"] != \"Canceled\"]\n",
"prev.fillna(0, inplace=True)\n",
"prev[\"TIME_TO_PAY\"] = prev[\"AMT_CREDIT\"] / prev[\"AMT_ANNUITY\"]\n",
"prev[\"TIME_TO_PAY\"] = np.where(prev[\"AMT_ANNUITY\"] == 0, 0, prev[\"AMT_CREDIT\"] / prev[\"AMT_ANNUITY\"])\n",
"prev[\"AMT_CREDIT\"] = np.where(prev[\"NAME_CONTRACT_STATUS\"] == \"Refused\", 0, prev[\"AMT_CREDIT\"])\n",
"prev[\"CREDIT_DIFFERENCE\"] = prev[\"AMT_CREDIT\"] - prev[\"AMT_APPLICATION\"]\n",
"prev.drop(columns=[\"AMT_ANNUITY\", \"AMT_APPLICATION\", \"AMT_CREDIT\"], inplace=True)\n",
Expand Down

0 comments on commit bd24d9a

Please sign in to comment.