Created
November 29, 2016 23:19
-
-
Save nmolivo/56ed3cda7b0fbd1ed4e67f53cc5b436d to your computer and use it in GitHub Desktop.
This file contains 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 matplotlib.pyplot as plt | |
from numpy.random import normal, uniform | |
import pandas as pd | |
import os | |
os.listdir() | |
data = pd.read_csv("DSI.csv") | |
data.head() | |
%matplotlib inline | |
plt.hist(data.backers) | |
plt.title("Backers Hist") | |
plt.xlabel("Backers") | |
plt.ylabel("Frequency") | |
plt.show() | |
plt.hist(data.duration) | |
plt.title("Duration Hist") | |
plt.xlabel("Duration") | |
plt.ylabel("Frequency") | |
plt.show() | |
durationmean=data.duration.mean() | |
durationmean | |
durationstd=data.duration.std() | |
durationstd | |
nobs=len(data) | |
nobs | |
lensd1 = len(data.loc[(data.duration > (durationmean-durationstd)) & (data.duration < (durationmean+durationstd))]) | |
lensd1 | |
lensd1/nobs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment