polars.read_parquet_schema
-
Get the schema of a Parquet file without reading data.
If you would like to read the schema of a cloud file with authentication configuration, it is recommended use
scan_parquet- e.g.scan_parquet(..., storage_options=...).collect_schema().- 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 builtinopenfunction, or aBytesIOinstance). For file-like objects, the stream position may not be updated accordingly after reading.
- Returns:
-
- dict
-
Dictionary mapping column names to datatypes
See also
polars.read_parquet_schema(
source: str | Path | IO[bytes] | bytes,
) → dict[str, DataType]
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/api/polars.read_parquet_schema.html