MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / collate_csv

Function collate_csv

diffusers/benchmarks/utils.py:88–98  ·  view source on GitHub ↗

Collates multiple identically structured CSVs into a single CSV file.

(input_files: List[str], output_file: str)

Source from the content-addressed store, hash-verified

86
87
88def collate_csv(input_files: List[str], output_file: str):
89 """Collates multiple identically structured CSVs into a single CSV file."""
90 with open(output_file, mode="w", newline="") as outfile:
91 writer = csv.DictWriter(outfile, fieldnames=BENCHMARK_FIELDS)
92 writer.writeheader()
93
94 for file in input_files:
95 with open(file, mode="r") as infile:
96 reader = csv.DictReader(infile)
97 for row in reader:
98 writer.writerow(row)

Callers 1

push_to_hf_datasetFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected