Download / Loading data
Loading the long schema
Plain columns, no index: close_ts and base come back as regular columns in pandas and in Polars.
pandas
Filter on base like any other column. The filters argument of read_parquet is applied while reading, so only the matching rows are loaded.
Polars
Filter on base, or pivot to get one column per asset.
Polars (lazy)
scan_parquet reads nothing yet: it only builds a query. Chain your operations on it, then call collect() last to run the whole query and load the result. The filter and the column selection are pushed down to the file, so only the matching rows and columns are read.