polars.read_parquet_schema#

polars.read_parquet_schema(source: str | Path | IO[bytes] | bytes) dict[str, DataType][source]#

Get the schema of a Parquet file without reading data.

Parameters:
source

Path to a file or a file-like object (by “file-like object” we refer to objects that have a read() method, such as a file handler like the builtin open function, or a BytesIO instance). For file-like objects, stream position may not be updated accordingly after reading.

Returns:
dict

Dictionary mapping column names to datatypes