Serializes a dictionary into a CSV file.
(file_name: str, data_dict: Dict[str, Union[str, bool, float]])
| 78 | |
| 79 | |
| 80 | def write_to_csv(file_name: str, data_dict: Dict[str, Union[str, bool, float]]): |
| 81 | """Serializes a dictionary into a CSV file.""" |
| 82 | with open(file_name, mode="w", newline="") as csvfile: |
| 83 | writer = csv.DictWriter(csvfile, fieldnames=BENCHMARK_FIELDS) |
| 84 | writer.writeheader() |
| 85 | writer.writerow(data_dict) |
| 86 | |
| 87 | |
| 88 | def collate_csv(input_files: List[str], output_file: str): |