Struct polars_lazy::frame::LazyJsonLineReader
source · [−]pub struct LazyJsonLineReader { /* private fields */ }
Implementations
sourceimpl 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
sourceimpl AnonymousScan for LazyJsonLineReader
impl AnonymousScan for LazyJsonLineReader
sourcefn scan(&self, scan_opts: AnonymousScanOptions) -> PolarsResult<DataFrame>
fn scan(&self, scan_opts: AnonymousScanOptions) -> PolarsResult<DataFrame>
Creates a dataframe from the supplied function & scan options.
sourcefn 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 Read more
sourcefn allows_projection_pushdown(&self) -> bool
fn allows_projection_pushdown(&self) -> bool
specify if the scan provider should allow projection pushdowns Read more
sourcefn allows_predicate_pushdown(&self) -> bool
fn allows_predicate_pushdown(&self) -> bool
specify if the scan provider should allow predicate pushdowns Read more
sourcefn allows_slice_pushdown(&self) -> bool
fn allows_slice_pushdown(&self) -> bool
specify if the scan provider should allow slice pushdowns Read more
Auto Trait Implementations
impl RefUnwindSafe for LazyJsonLineReader
impl Send for LazyJsonLineReader
impl Sync for LazyJsonLineReader
impl Unpin for LazyJsonLineReader
impl UnwindSafe for LazyJsonLineReader
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more