Created
April 22, 2016 17:22
-
-
Save matmoody/f91a07e350eb7b4dc00e685f74420c93 to your computer and use it in GitHub Desktop.
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 pandas as pd | |
import scipy.stats as stats | |
import matplotlib.pyplot as plt | |
%matplotlib inline | |
loansData = pd.read_csv('https://github.com/Thinkful-Ed/curric-data-001-data-sets/raw/master/loans/loansData.csv') | |
loansData.head() | |
# Remove rows with null values | |
loansData.dropna(inplace=True) | |
# Create Box Plot on Amount.Requested | |
loansData.boxplot(column='Amount.Requested') | |
plt.show() | |
# Create Histogram on Amount.Requested | |
loansData.hist(column='Amount.Requested') | |
plt.show() | |
# Does data look normally distributed? Generate QQ plot to test answer | |
plt.figure() | |
graph = stats.probplot(loansData['Amount.Requested'], dist='norm', plot=plt) | |
plt.show() | |
# The amounts requested match the amounts funded by investors, which makes logical sense. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment