compute_series#
- nominal.experimental.compute_as_code.compute_series(client: NominalClient, expr: nominal.compute.NumericSeries | nominal.compute.CategoricalSeries, inputs: Mapping[str, Channel], start: _FlexibleTimestamp | None = None, end: _FlexibleTimestamp | None = None, *, tags_by_reference: Mapping[str, Mapping[str, str]] | None = None, name: str = 'value', enable_gzip: bool = True) pd.Series[Any]#
Compute a derived series by applying a
nominal.computeexpression to a set of channels.- Parameters:
client – The NominalClient to compute with.
expr – The compute-as-code expression to evaluate (numeric or categorical), typically authored in
nominal.computeand imported from your own repository.inputs – Maps each reference name used in
exprto theChannelit should resolve to. Look these up from the run/dataset the caller wants to compute against.start – Start of the time range to compute over. Defaults to the earliest supported timestamp.
end – End of the time range to compute over. Defaults to the latest supported timestamp.
tags_by_reference – Optional tag filters, keyed by reference name (the same keys as
inputs) and then by tag key. Use this when the channel bound to a reference carries more than one tagged series. For example,tags_by_reference={"velocity": {"vehicle": "car_1"}}narrows the channel bound to reference"velocity"down to the series taggedvehicle=car_1. References omitted fromtags_by_referenceare bound without a tag filter.name – Name for the returned series (also the CSV column name requested from the export service).
enable_gzip – If true, gzip the export from Nominal.
- Returns:
A
pandas.Seriesof the computed values, indexed by timestamp. The index name is “timestamp” and the series name isname.