MCPcopy Create free account
hub / github.com/Dizzy-K/AutoPT / _write_csv

Function _write_csv

analysis/cli.py:217–228  ·  view source on GitHub ↗
(path: Path, rows: list[dict[str, Any]])

Source from the content-addressed store, hash-verified

215
216
217def _write_csv(path: Path, rows: list[dict[str, Any]]) -> None:
218 fieldnames: list[str] = []
219 for row in rows:
220 for key in row:
221 if key not in fieldnames:
222 fieldnames.append(key)
223
224 with path.open("w", newline="", encoding="utf-8") as stream:
225 writer = csv.DictWriter(stream, fieldnames=fieldnames)
226 writer.writeheader()
227 for row in rows:
228 writer.writerow(row)
229
230
231def _write_matrix_csv(path: Path, row_label: str, matrix: dict[str, Any]) -> None:

Callers 1

handle_analysis_commandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected