quantlab.utils.resample.resample_store_path#

quantlab.utils.resample.resample_store_path(path, freq)[source]#

Return the store a resampled object reads and writes.

The resampled store sits beside the source store with _resample_<freq> added to its name: klines.zarr becomes klines_resample_1d.zarr. With freq unset the source path is returned unchanged; a None path stays None.

Examples

>>> resample_store_path("data/klines.zarr", "1d")
'data/klines_resample_1d.zarr'
>>> resample_store_path("data/klines.zarr", None)
'data/klines.zarr'