def AsCsv(self):
    output = StringIO.StringIO()
    writer = csv.DictWriter(output, self.fields)
    if hasattr(writer, "writeheader"):
      writer.writeheader()  # requires 2.7
    for val in self.results:
      writer.writerow(val)
    output.seek(0)
    return output
Give the report in CSV format.
dataset/ETHPy150Open google/grr/grr/lib/aff4_objects/reports.py/ClientReport.AsCsv