user_id emp_length home_ownership annual_inc verification_status user \ 0 1 10+ years RENT 78000.0 Source Verified 1 1 2 8 years MORTGAGE 58000.0 Not Verified 2 2 3 10+ years MORTGAGE 125000.0 Verified 3 3 4 10+ years RENT 69000.0 Source Verified 4 4 5 < 1 year RENT 50000.0 Source Verified 5 ... ... ... ... ... ... ... 1643 1644 10+ years OWN 72000.0 Verified 1644 1644 1645 7 years MORTGAGE 62000.0 Source Verified 1645 1645 1646 4 years RENT 50000.0 Source Verified 1646 1646 1647 1 year RENT 45000.0 Not Verified 1647 1647 1648 2 years OWN 35000.0 Not Verified 1648
acc_open_past_24mths avg_cur_bal term int_rate grade \ 0 5 29828.0 60 months 12.39% C 1 7 9536.0 36 months 6.99% A 2 2 32727.0 60 months 17.14% D 3 8 3214.0 36 months 13.66% C 4 6 5857.0 36 months 13.66% C ... ... ... ... ... ... 1643 3 1676.0 NaN NaN NaN 1644 4 21360.0 NaN NaN NaN 1645 1 3180.0 NaN NaN NaN 1646 8 3652.0 NaN NaN NaN 1647 3 1586.0 NaN NaN NaN
loan_status 0 Fully Paid 1 Charged Off 2 In Grace Period 3 Fully Paid 4 Charged Off ... ... 1643 NaN 1644 NaN 1645 NaN 1646 NaN 1647 NaN
emp_length home_ownership annual_inc verification_status user \ 0 10+ years RENT 78000.0 Source Verified 1 1 8 years MORTGAGE 58000.0 Not Verified 2 2 10+ years MORTGAGE 125000.0 Verified 3 3 10+ years RENT 69000.0 Source Verified 4 4 < 1 year RENT 50000.0 Source Verified 5 ... ... ... ... ... ... 1643 10+ years OWN 72000.0 Verified 1644 1644 7 years MORTGAGE 62000.0 Source Verified 1645 1645 4 years RENT 50000.0 Source Verified 1646 1646 1 year RENT 45000.0 Not Verified 1647 1647 2 years OWN 35000.0 Not Verified 1648
acc_open_past_24mths avg_cur_bal term int_rate grade \ 0 5 29828.0 60 months 12.39% C 1 7 9536.0 36 months 6.99% A 2 2 32727.0 60 months 17.14% D 3 8 3214.0 36 months 13.66% C 4 6 5857.0 36 months 13.66% C ... ... ... ... ... ... 1643 3 1676.0 NaN NaN NaN 1644 4 21360.0 NaN NaN NaN 1645 1 3180.0 NaN NaN NaN 1646 8 3652.0 NaN NaN NaN 1647 3 1586.0 NaN NaN NaN
loan_status 0 Fully Paid 1 Charged Off 2 In Grace Period 3 Fully Paid 4 Charged Off ... ... 1643 NaN 1644 NaN 1645 NaN 1646 NaN 1647 NaN
ss = ['term', 'grade', 'emp_length', 'annual_inc', 'home_ownership', 'verification_status'] for s in ss: dum_list = pd.get_dummies(a3[s], prefix = s) print(dum_list.head())