Trait polars::prelude::LazyFileListReader  
source · pub trait LazyFileListReader: Clone {
Show 16 methods
    // Required methods
    fn finish_no_glob(self) -> Result<LazyFrame, PolarsError>;
    fn path(&self) -> &Path;
    fn paths(&self) -> &[PathBuf];
    fn with_path(self, path: PathBuf) -> Self;
    fn with_paths(self, paths: Arc<[PathBuf]>) -> 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) -> Result<LazyFrame, PolarsError> { ... }
    fn concat_impl(&self, lfs: Vec<LazyFrame>) -> Result<LazyFrame, PolarsError> { ... }
    fn glob(&self) -> bool { ... }
    fn cloud_options(&self) -> Option<&CloudOptions> { ... }
    fn iter_paths(
        &self
    ) -> Result<Option<Box<dyn Iterator<Item = Result<PathBuf, PolarsError>>>>, PolarsError> { ... }
}Available on crate feature 
lazy only.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) -> Result<LazyFrame, PolarsError>
 
fn finish_no_glob(self) -> Result<LazyFrame, PolarsError>
Get the final LazyFrame. This method assumes, that path is not a glob.
It is recommended to always use LazyFileListReader::finish method.
fn paths(&self) -> &[PathBuf]
sourcefn 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.
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>) -> Result<LazyFrame, PolarsError>
 
fn concat_impl(&self, lfs: Vec<LazyFrame>) -> Result<LazyFrame, PolarsError>
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 cloud_options(&self) -> Option<&CloudOptions>
 
fn cloud_options(&self) -> Option<&CloudOptions>
CloudOptions used to list files.
sourcefn iter_paths(
    &self
) -> Result<Option<Box<dyn Iterator<Item = Result<PathBuf, PolarsError>>>>, PolarsError>
 
fn iter_paths( &self ) -> Result<Option<Box<dyn Iterator<Item = Result<PathBuf, PolarsError>>>>, PolarsError>
Get list of files referenced by this reader.
Returns None if path is not a glob pattern.
Object Safety§
This trait is not object safe.