pub fn infer<R: BufRead>(
    reader: &mut R,
    number_of_rows: Option<usize>
) -> Result<DataType>
Available on crate feature io_json only.
Expand description

Infers the DataType from an NDJSON file, optionally only using number_of_rows rows.

Implementation

This implementation reads the file line by line and infers the type of each line. It performs both O(N) IO and CPU-bounded operations where N is the number of rows.