# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# ### Load Loan Prediction Dataset

import pandas as pd

loan_data = pd.read_csv('train_loan.csv')
loan_data.head()

# ### Feature 1 -Total Income

loan_data['Total_income'] = loan_data['ApplicantIncome'] + loan_data['CoapplicantIncome'] 
loan_data[['ApplicantIncome', 'CoapplicantIncome', 'Total_income']].head()

# ### Feature 2 - Loan amount and Income  Ratio

loan_data['loan_income_ratio'] = loan_data['LoanAmount'] / loan_data['ApplicantIncome']
loan_data[['ApplicantIncome', 'LoanAmount', 'loan_income_ratio']].head()



StarcoderdataJupyterScriptsDedupFiltered