In [14]:
from bigbang.archive import load as load_archive
from collections import defaultdict
import csv

url = 'http://mm.icann.org/pipermail/wp4/'

stem = False

try:
    arch_path = '../archives/'+url[:-1].replace('://','_/')+'.csv'
    archive = load_archive(arch_path).data
except:
    arch_path = '../archives/'+url[:-1].replace('//','/')+'.csv'
    archive = load_archive(arch_path).data
    
    

users = list(archive["From"])
users_count_f = open('../users_count.csv', "wb")
users_count_w = csv.writer(users_count_f)
for user in set(users):
    users_count_w.writerow([user]+[list(archive["From"]).count(user)])
users_count_f.close()

In [5]:



Out[5]:
'kimberly.carlson at icann.org (Kimberly Carlson)'

In [ ]: