polars.read_avro#

polars.read_avro(source: str | Path | BytesIO | BinaryIO, *, columns: list[int] | list[str] | None = None, n_rows: int | None = None) DataFrame[source]#

Read into a DataFrame from Apache Avro format.

Parameters:
source

Path to a file or a file-like object.

columns

Columns to select. Accepts a list of column indices (starting at zero) or a list of column names.

n_rows

Stop reading from Apache Avro file after reading n_rows.

Returns:
DataFrame