compute_csv function

Compute results to a CSV file