MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / write_csv

Function write_csv

experiments/human_eval/build_drift_human_eval_packet.py:234–240  ·  view source on GitHub ↗
(path: Path, rows: List[Dict[str, Any]])

Source from the content-addressed store, hash-verified

232
233
234def write_csv(path: Path, rows: List[Dict[str, Any]]) -> None:
235 path.parent.mkdir(parents=True, exist_ok=True)
236 fields = list(rows[0].keys()) if rows else []
237 with path.open("w", encoding="utf-8-sig", newline="") as handle:
238 writer = csv.DictWriter(handle, fieldnames=fields)
239 writer.writeheader()
240 writer.writerows(rows)
241
242
243def write_guidelines(path: Path) -> None:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected