Struct polars_lazy::frame::LazyJsonLineReader
source · pub struct LazyJsonLineReader { /* private fields */ }
Available on crate feature
json
only.Implementations§
source§impl LazyJsonLineReader
impl LazyJsonLineReader
pub fn new(path: String) -> Self
sourcepub fn with_row_count(self, row_count: Option<RowCount>) -> Self
pub fn with_row_count(self, row_count: Option<RowCount>) -> Self
Add a row_count
column.
sourcepub fn with_n_rows(self, num_rows: Option<usize>) -> Self
pub fn with_n_rows(self, num_rows: Option<usize>) -> Self
Try to stop parsing when n
rows are parsed. During multithreaded parsing the upper bound n
cannot
be guaranteed.
sourcepub fn with_infer_schema_length(self, num_rows: Option<usize>) -> Self
pub fn with_infer_schema_length(self, num_rows: Option<usize>) -> Self
Set the number of rows to use when inferring the json schema.
the default is 100 rows.
Setting to None
will do a full table scan, very slow.
sourcepub fn with_schema(self, schema: Schema) -> Self
pub fn with_schema(self, schema: Schema) -> Self
Set the JSON file’s schema
sourcepub fn low_memory(self, toggle: bool) -> Self
pub fn low_memory(self, toggle: bool) -> Self
Reduce memory usage in expensive of performance
sourcepub fn with_rechunk(self, toggle: bool) -> Self
pub fn with_rechunk(self, toggle: bool) -> Self
Rechunk the memory to contiguous chunks when parsing is done.
pub fn with_batch_size(self, batch_size: Option<usize>) -> Self
pub fn finish(self) -> PolarsResult<LazyFrame>
Trait Implementations§
source§impl AnonymousScan for LazyJsonLineReader
impl AnonymousScan for LazyJsonLineReader
source§fn scan(&self, scan_opts: AnonymousScanOptions) -> PolarsResult<DataFrame>
fn scan(&self, scan_opts: AnonymousScanOptions) -> PolarsResult<DataFrame>
Creates a dataframe from the supplied function & scan options.
source§fn schema(&self, infer_schema_length: Option<usize>) -> PolarsResult<Schema>
fn schema(&self, infer_schema_length: Option<usize>) -> PolarsResult<Schema>
function to supply the schema.
Allows for an optional infer schema argument for data sources with dynamic schemas
source§fn allows_projection_pushdown(&self) -> bool
fn allows_projection_pushdown(&self) -> bool
specify if the scan provider should allow projection pushdowns Read more
source§fn allows_predicate_pushdown(&self) -> bool
fn allows_predicate_pushdown(&self) -> bool
specify if the scan provider should allow predicate pushdowns Read more
source§fn allows_slice_pushdown(&self) -> bool
fn allows_slice_pushdown(&self) -> bool
specify if the scan provider should allow slice pushdowns Read more