'Output a CSV representation of a set of results.'

def output_csv(self, prefix):

    summary = self._create_summary()
    for (scenario, results) in summary.iteritems():
        filename = '{prefix}-{scenario}.csv'.format(prefix=prefix, scenario=scenario)
        headers = []
        for key in itertools.chain(*results):
            if (key not in headers):
                headers.append(key)
        write_csv(results, headers, filename)
