INNER CODE UNIT · Python
load_dataset
paperswithbacktest/pwb-toolbox · pwb_toolbox/datasets/__init__.py:642
def load_dataset(
path,
symbols=None,
adjust=True,
extend=False,
to_usd=True,
rate_to_price=True,
use_hf=False
):
split = "train"
pwb_api_key = _get_pwb_api_key()
# Resolve the symbol filter up front (on a copy, so the caller's list is
# never mutated) so it can be pushed down to the per-shard parquet reads
# instead of concatenating every shard in memory and filtering afterwards.
symbol_filter = None
if isinstance(symbols, list):
symbol_filter = list(symbols)