This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import csv | |
| import pandas as pd | |
| import numpy as np | |
| import re | |
| import string | |
| myDataFrame = pd.read_csv('Loan_payments_data_2020_unclean.csv') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #check total number of males | |
| totalMales = newDF.loc[(newDF.Gender=='Male')].count() #409 | |
| print("totalMales" + str(totalMales)) | |
| totalFemales = newDF.loc[(newDF.Gender=='Female')].count() #77 | |
| print("totalFemales" + str(totalFemales)) | |
| #males are more likely to borrow than females 409 > 77 |
OlderNewer