Skip to content

Instantly share code, notes, and snippets.

@nmolivo
Created November 29, 2016 23:19
Show Gist options
  • Save nmolivo/56ed3cda7b0fbd1ed4e67f53cc5b436d to your computer and use it in GitHub Desktop.
Save nmolivo/56ed3cda7b0fbd1ed4e67f53cc5b436d to your computer and use it in GitHub Desktop.
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