writeCsv
fn
void writeCsv(Sink)(ref Sink sink, DataFrame df,
CsvWritePolicy policy = CsvWritePolicy.init)Writes the frame as CSV rows through ddn-df's own row renderer: row segments rendered straight into per-segment buffers (every cell formatted or copied exactly once, quoting rules mirrored from ddn.data.csv.CsvWriter and held byte-exact by differential tests) and flushed to the sink in order. CsvWriter itself still emits the header and serves as the fallback for dialects the fast path does not take. Nulls write the policy's nullValue (empty by default); temporals render through the strict formatters; the output uses LF.
Parameters
sink | the output range taking const(char)[] |
df | the frame to write |
policy | the writing policy |
Throws
DataFrameException with the row on any writer failure.
fn
void writeCsv(string path, DataFrame df,
CsvWritePolicy policy = CsvWritePolicy.init)Writes the frame to a file (the parent directory must exist).
Parameters
path | the destination path |
df | the frame to write |
policy | the writing policy |
Throws
DataFrameException on IO or writer failures.