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_paths(paths: Arc<[PathBuf]>) -> Self
pub fn new(path: impl AsRef<Path>) -> Self
sourcepub fn with_row_index(self, row_index: Option<RowIndex>) -> Self
 
pub fn with_row_index(self, row_index: Option<RowIndex>) -> Self
Add a row index column.
sourcepub fn with_ignore_errors(self, ignore_errors: bool) -> Self
 
pub fn with_ignore_errors(self, ignore_errors: bool) -> Self
Set values as Null if parsing fails because of schema mismatches.
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.
Ignored when the schema is specified explicitly using Self::with_schema.
Setting to None will do a full table scan, very slow.
sourcepub fn with_schema(self, schema: Option<SchemaRef>) -> Self
 
pub fn with_schema(self, schema: Option<SchemaRef>) -> 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 at the expense of performance
pub fn with_batch_size(self, batch_size: Option<NonZeroUsize>) -> Self
Trait Implementations§
source§impl AnonymousScan for LazyJsonLineReader
 
impl AnonymousScan for LazyJsonLineReader
fn as_any(&self) -> &dyn Any
source§fn scan(&self, scan_opts: AnonymousScanArgs) -> PolarsResult<DataFrame>
 
fn scan(&self, scan_opts: AnonymousScanArgs) -> PolarsResult<DataFrame>
Creates a DataFrame from the supplied function & scan options.
source§fn schema(&self, infer_schema_length: Option<usize>) -> PolarsResult<SchemaRef>
 
fn schema(&self, infer_schema_length: Option<usize>) -> PolarsResult<SchemaRef>
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
§fn allows_predicate_pushdown(&self) -> bool
 
fn allows_predicate_pushdown(&self) -> bool
specify if the scan provider should allow predicate pushdowns Read more
§fn allows_slice_pushdown(&self) -> bool
 
fn allows_slice_pushdown(&self) -> bool
specify if the scan provider should allow slice pushdowns Read more
source§impl Clone for LazyJsonLineReader
 
impl Clone for LazyJsonLineReader
source§fn clone(&self) -> LazyJsonLineReader
 
fn clone(&self) -> LazyJsonLineReader
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moresource§impl LazyFileListReader for LazyJsonLineReader
 
impl LazyFileListReader for LazyJsonLineReader
source§fn with_rechunk(self, toggle: bool) -> Self
 
fn with_rechunk(self, toggle: bool) -> Self
Rechunk the memory to contiguous chunks when parsing is done.
source§fn n_rows(&self) -> Option<usize>
 
fn n_rows(&self) -> Option<usize>
Try to stop parsing when n rows are parsed. During multithreaded parsing the upper bound n cannot
be guaranteed.
source§fn finish_no_glob(self) -> PolarsResult<LazyFrame>
 
fn finish_no_glob(self) -> PolarsResult<LazyFrame>
fn paths(&self) -> &[PathBuf]
source§fn with_path(self, path: PathBuf) -> Self
 
fn with_path(self, path: PathBuf) -> Self
Set path of the scanned file.
Support glob patterns.
source§fn with_paths(self, paths: Arc<[PathBuf]>) -> Self
 
fn with_paths(self, paths: Arc<[PathBuf]>) -> Self
Set paths of the scanned files.
Doesn’t glob patterns.
source§fn with_row_index(self, row_index: impl Into<Option<RowIndex>>) -> Self
 
fn with_row_index(self, row_index: impl Into<Option<RowIndex>>) -> Self
Configure the row index.
fn glob(&self) -> bool
source§fn cloud_options(&self) -> Option<&CloudOptions>
 
fn cloud_options(&self) -> Option<&CloudOptions>
CloudOptions used to list files.
source§fn iter_paths(&self) -> PolarsResult<Option<PathIterator>>
 
fn iter_paths(&self) -> PolarsResult<Option<PathIterator>>
Get list of files referenced by this reader. Read more
Auto Trait Implementations§
impl Freeze for LazyJsonLineReader
impl RefUnwindSafe for LazyJsonLineReader
impl Send for LazyJsonLineReader
impl Sync for LazyJsonLineReader
impl Unpin for LazyJsonLineReader
impl UnwindSafe for LazyJsonLineReader
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more