sums = []
counts = []
for fn in filenames:
df = delayed(pd.read_csv)(fn)
by_origin = df.groupby('Origin')
total = by_origin.DepDelay.sum()
count = by_origin.DepDelay.count()
sums.append(total)
counts.append(count)
sums, counts = compute(sums, counts)
total_delays = sum(sums)
n_flights = sum(counts)
mean = total_delays / n_flights