Reading CSV Data Python Example
Reading CSV Data Python Example
import numpy as np
import matplotlib.pyplot as plt
loandata=pd.read_csv('loansData-Copy1.csv')#Reading csv file
#Fetching the names of the columns
loandata.columns.values
array(['Amount.Requested', 'Amount.Funded.By.Investors',
'Interest.Rate',
'Loan.Length', 'Loan.Purpose', 'Debt.To.Income.Ratio', 'State',
'Home.Ownership', 'Monthly.Income', 'FICO.Range',
'Open.CREDIT.Lines', 'Revolving.CREDIT.Balance',
'Inquiries.in.the.Last.6.Months', 'Employment.Length'],
dtype=object)
81174 6541.67
99592 4583.33
80059 11500.00
15825 3833.33
33182 3195.00
Name: Monthly.Income, dtype: float64
Open.CREDIT.Lines Revolving.CREDIT.Balance \
count 2498.000000 2498.000000
mean 10.075661 15244.559648
std 4.508644 18308.549795
min 2.000000 0.000000
25% 7.000000 5585.750000
50% 9.000000 10962.000000
75% 13.000000 18888.750000
max 38.000000 270800.000000
Inquiries.in.the.Last.6.Months Monthly.Logincome
count 2498.000000 2499.000000
mean 0.906325 8.501915
std 1.231036 0.523019
min 0.000000 6.377577
25% 0.000000 8.160518
50% 0.000000 8.517193
75% 1.000000 8.824678
max 9.000000 11.540054
loandata['Monthly.Income'].describe()
count 2499.000000
mean 5688.931321
std 3963.118185
min 588.500000
25% 3500.000000
50% 5000.000000
75% 6800.000000
max 102750.000000
Name: Monthly.Income, dtype: float64