baml.csv.stringify_records

Serializes raw records to CSV text.

Reference version

Signature

function baml.csv.stringify_records(
records: baml.csv.Value[][],
options: baml.csv.WriterOptions | null = …
) -> string throws baml.csv.Error

Serializes raw records to CSV text.

No header is ever emitted: raw records carry no field names to derive one from. Write the header row yourself as the first entry of records if you want one. Rows are written one at a time, so a failure part-way leaves the earlier rows encoded but discards the text along with the error.

Throws

  • Error for anything buffer and Writer.write_record throw.

Source:<builtin>/baml/ns_csv/csv.bamlbytes 4133741751