pub trait LazyFileListReader: Clone {
Show 13 methods // Required methods fn finish_no_glob(self) -> PolarsResult<LazyFrame>; fn path(&self) -> &Path; fn paths(&self) -> &[PathBuf]; fn with_path(self, path: PathBuf) -> Self; fn with_paths(self, paths: Arc<[PathBuf]>) -> Self; fn rechunk(&self) -> bool; fn with_rechunk(self, toggle: bool) -> Self; fn n_rows(&self) -> Option<usize>; fn row_count(&self) -> Option<&RowCount>; // Provided methods fn finish(self) -> PolarsResult<LazyFrame> { ... } fn concat_impl(&self, lfs: Vec<LazyFrame>) -> PolarsResult<LazyFrame> { ... } fn cloud_options(&self) -> Option<&CloudOptions> { ... } fn iter_paths(&self) -> PolarsResult<Option<PathIterator>> { ... }
}
Expand description

Reads LazyFrame from a filesystem or a cloud storage. Supports glob patterns.

Use LazyFileListReader::finish to get the final LazyFrame.

Required Methods§

source

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.

source

fn path(&self) -> &Path

Path of the scanned file. It can be potentially a glob pattern.

source

fn paths(&self) -> &[PathBuf]

source

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

Set paths of the scanned files. Doesn’t glob patterns.

source

fn rechunk(&self) -> bool

Rechunk the memory to contiguous chunks when parsing is done.

source

fn with_rechunk(self, toggle: bool) -> Self

Rechunk the memory to contiguous chunks when parsing is done.

source

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 row_count(&self) -> Option<&RowCount>

Add a row_count column.

Provided Methods§

source

fn finish(self) -> PolarsResult<LazyFrame>

Get the final LazyFrame.

source

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_count.

source

fn cloud_options(&self) -> Option<&CloudOptions>

CloudOptions used to list files.

source

fn iter_paths(&self) -> PolarsResult<Option<PathIterator>>

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.

Implementors§

source§

impl LazyFileListReader for LazyCsvReader<'_>

Available on crate feature csv only.
source§

impl LazyFileListReader for LazyJsonLineReader

Available on crate feature json only.