Filling the missing data using regression in python

    # The dataset is bank loan assessment data,includes 614 rows and 13 columns. The variables have many missing values. Click here to download the excel file.

    # One of the variable loan amount is a continuous variable has 22 missing values and Credit_History is categorical variable which has 50 missing values. The values will be filled by regressing with applicant income variable for Loan Amount and Credit History categorical variable with Loan Status categorical variable.



    # One hot coding is done to convert Loan_Status variable from object type to binary type. Python will only understand binary type for categorical variables



    # Fill all the Na's in Credit History with same as Loan_status



    # Filling loan Amount data by regressing Applicant Income

    # Before regression we have to remove all NA associated with LoanAmount