This notebook exports a csv file with a list with all senders to the mailinglist, and the amount of emails they have sent to the list.

The output of this notebook can be used as input into the SummerSchoolUsersTopWords notebook.


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

ml_name = '6lo/'

stem = False

try:
    arch_path = '../archives/'+ml_name[:-1].replace('://','_/')+'.csv'
    archive = load_archive(arch_path).data
except:
    arch_path = '../archives/'+ml_name[:-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 [ ]:


In [ ]: