scanCsv

fnLazyFrame scanCsv(string path, Schema schema, CsvReadPolicy policy = CsvReadPolicy.init, CsvScanMode mode = CsvScanMode.AUTO) @trusted

Opens a CSV file as a lazy scan source: the returned deferred frame pulls one batch per policy.chunkRows rows when collected or streamed, without loading the file first. The schema is explicit (inference arrives with its own contract); parse errors surface in file order at the first failing batch, exactly like the eager serial reader.

Parameters

paththe CSV file path
schemathe expected columns (by name when policy.hasHeader, by position otherwise)
policythe reading policy
modethe input mode (AUTO: mmap for regular files, buffered otherwise)

Returns

the deferred frame over the scan source.

Throws

DataFrameException when the file cannot be opened, or

MMAP is requested for a source that cannot be mapped.

fnLazyFrame scanCsv(File input, Schema schema, CsvReadPolicy policy = CsvReadPolicy.init) @trusted

Ditto, from an already-open handle (a pipe, stdin, a socket stream - the buffered mode by construction; the source owns the handle until close()).