In [29]:
import sys
sys.path.insert(0, '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python')
sys.path.insert(0, '/Library/Python/2.7/site-packages')
In [30]:
import pandas as pd
import numpy as np
import os
In [31]:
surveys = os.listdir("experts+friends")
In [37]:
for each in surveys:
if each.count("_ideas.csv"):
continue
df = pd.read_csv("experts+friends/" + each, header=0)
voters = np.unique(df['Session ID'])
print(each, "Number of votes: %d" % len(df.index), "Number of unique voters: %d" % len(voters))
In [38]:
surveys = os.listdir("mturks")
In [39]:
for each in surveys:
if each.count("_ideas.csv"):
continue
df = pd.read_csv("mturks/" + each, header=0)
voters = np.unique(df['Session ID'])
print(each, "Number of votes: %d" % len(df.index), "Number of unique voters: %d" % len(voters))
In [ ]: