polars.scan_ipc

polars.scan_ipc(file: Union[str, pathlib.Path], n_rows: Optional[int] = None, cache: bool = True, rechunk: bool = True, row_count_name: Optional[str] = None, row_count_offset: int = 0, **kwargs: Any) polars.internals.lazy_frame.LazyFrame

Lazily read from an Arrow IPC (Feather v2) file or multiple files via glob patterns.

This allows the query optimizer to push down predicates and projections to the scan level, thereby potentially reducing memory overhead.

Parameters
file

Path to a IPC file.

n_rows

Stop reading from IPC file after reading n_rows.

cache

Cache the result after reading.

rechunk

Reallocate to contiguous memory when all chunks/ files are parsed.

row_count_name

If not None, this will insert a row count column with give name into the DataFrame

row_count_offset

Offset to start the row_count column (only use if the name is set)