compute_series#
- nominal.experimental.compute_as_code.compute_series(client, expr, inputs, start=None, end=None, *, tags_by_reference=None, name='value', enable_gzip=True)#
Compute a derived series by applying a
nominal.computeexpression to a set of channels.- Parameters:
client (NominalClient)
The NominalClient to compute with.
expr (nominal.compute.NumericSeries | nominal.compute.CategoricalSeries)
The compute-as-code expression to evaluate (numeric or categorical), typically authored in
nominal.computeand imported from your own repository.inputs (Mapping[str, Channel])
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 (_FlexibleTimestamp | None)
Start of the time range to compute over. Defaults to the earliest supported timestamp.
end (_FlexibleTimestamp | None)
End of the time range to compute over. Defaults to the latest supported timestamp.
tags_by_reference (Mapping[str, Mapping[str, str]] | None)
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 (str)
Name for the returned series (also the CSV column name requested from the export service).
enable_gzip (bool)
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.- Return type:
pd.Series[Any]