read_parquet#

API documentation for tradingstrategy.reader.read_parquet Python function.

read_parquet(path, filters=None)[source]#

Reads compressed Parquet file of data to memory.

File or stream can describe tradingstrategy.candle.Candle or tradingstrategy.pair.DEXPair data.

Filtering of candle data can be done during the read time, so that large dataset files do not need to be fully loaded to the memory. This severely reduces the RAM usage for low-memory environments when dealing Parquet.

For filtering options see Parquet documentation.

See pyarrow.parquet.read_table().

You can disable “threaded read” using PYARROW_THREADED_READ environment variable to lower the memory consumption. Used in parallel testing.

Parameters:
  • stream – A file input that must support seeking.

  • filters (Optional[List[Tuple]]) – Parquet read_table filters.

  • path (Path) –

Return type:

Table