Format the CSV output