quantlab.utils.resample.resolve_resample_how#
- quantlab.utils.resample.resolve_resample_how(how, variables, owner)[source]#
Return one method per variable of the panel being resampled.
A string applies to every variable. A dict must name every variable: an unlisted variable is refused rather than silently dropped or given a default, and a listed name the panel does not have is refused too.
- Parameters:
- howdict[str, str] or str
The
resample_howfield.- variableslist[str]
The panel’s data variables.
- ownerstr
Class name quoted in error messages.
Examples
>>> resolve_resample_how("last", ["bid", "ask"], "NbboPanelDataset") {'bid': 'last', 'ask': 'last'} >>> resolve_resample_how({"bid": "last"}, ["bid", "ask"], "NbboPanelDataset") Traceback (most recent call last): ValueError: NbboPanelDataset: resample_how does not name ['ask'] ...