pub trait LazyFileListReader: Clone {
Show 14 methods
// Required methods
fn finish_no_glob(self) -> PolarsResult<LazyFrame>;
fn sources(&self) -> &ScanSources;
fn with_sources(self, source: ScanSources) -> Self;
fn with_n_rows(self, n_rows: impl Into<Option<usize>>) -> Self;
fn with_row_index(self, row_index: impl Into<Option<RowIndex>>) -> Self;
fn rechunk(&self) -> bool;
fn with_rechunk(self, toggle: bool) -> Self;
fn n_rows(&self) -> Option<usize>;
fn row_index(&self) -> Option<&RowIndex>;
// Provided methods
fn finish(self) -> PolarsResult<LazyFrame> { ... }
fn concat_impl(&self, lfs: Vec<LazyFrame>) -> PolarsResult<LazyFrame> { ... }
fn glob(&self) -> bool { ... }
fn with_paths(self, paths: Arc<[PathBuf]>) -> Self { ... }
fn cloud_options(&self) -> Option<&CloudOptions> { ... }
}
Expand description
Reads LazyFrame from a filesystem or a cloud storage. Supports glob patterns.
Use LazyFileListReader::finish to get the final LazyFrame.
Required Methods§
Sourcefn finish_no_glob(self) -> PolarsResult<LazyFrame>
fn finish_no_glob(self) -> PolarsResult<LazyFrame>
Get the final LazyFrame. This method assumes, that path is not a glob.
It is recommended to always use LazyFileListReader::finish method.
Sourcefn with_sources(self, source: ScanSources) -> Self
fn with_sources(self, source: ScanSources) -> Self
Set sources of the scanned files.
Sourcefn with_n_rows(self, n_rows: impl Into<Option<usize>>) -> Self
fn with_n_rows(self, n_rows: impl Into<Option<usize>>) -> Self
Configure the row limit.
Sourcefn 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.
Sourcefn with_rechunk(self, toggle: bool) -> Self
fn with_rechunk(self, toggle: bool) -> Self
Rechunk the memory to contiguous chunks when parsing is done.
Provided Methods§
Sourcefn concat_impl(&self, lfs: Vec<LazyFrame>) -> PolarsResult<LazyFrame>
fn concat_impl(&self, lfs: Vec<LazyFrame>) -> PolarsResult<LazyFrame>
Recommended concatenation of LazyFrames from many input files.
This method should not take into consideration LazyFileListReader::n_rows nor LazyFileListReader::row_index.
fn glob(&self) -> bool
Sourcefn with_paths(self, paths: Arc<[PathBuf]>) -> Self
fn with_paths(self, paths: Arc<[PathBuf]>) -> Self
Set paths of the scanned files.
Sourcefn cloud_options(&self) -> Option<&CloudOptions>
fn cloud_options(&self) -> Option<&CloudOptions>
CloudOptions used to list files.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl LazyFileListReader for LazyCsvReader
csv
only.impl LazyFileListReader for LazyJsonLineReader
json
only.