write_records_as_csv

emlib.csvtools.write_records_as_csv(records, outfile)[source]

Write the records as a csv file

Parameters:
  • records (list) – a list of dataclass objects or namedtuples (anything with a ‘_fields’ attribute)

  • outfile (str) – the path to save the csv file

Return type:

None