# 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.compute` expression to a set of channels.

Parameters:
:   - **client** ([*NominalClient*](https://dev.nominal.io/python/ref/generated/nominal.core.NominalClient.md#nominal.core.NominalClient "nominal.core.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.compute` and imported from your own repository.
    - **inputs** (*Mapping**[*[*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)")*,* [*Channel*](https://dev.nominal.io/python/ref/generated/nominal.core.Channel.md#nominal.core.Channel "nominal.core.Channel")*]*)

      Maps each reference name used in `expr` to the [`Channel`](https://dev.nominal.io/python/ref/generated/nominal.core.Channel.md#nominal.core.Channel "nominal.core.channel.Channel") it 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*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)")*,* *Mapping**[*[*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)")*,* [*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)")*]**]* *|* *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 tagged `vehicle=car_1`. References omitted from
      `tags_by_reference` are bound without a tag filter.
    - **name** ([*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)"))

      Name for the returned series (also the CSV column name requested from the export service).
    - **enable_gzip** ([*bool*](https://docs.python.org/3/builtins/functions.html#bool "(in Python v3.15)"))

      If true, gzip the export from Nominal.

Returns:
:   A `pandas.Series` of the computed values, indexed by timestamp. The index name is “timestamp” and the series
    name is `name`.

Return type:
:   pd.Series[*Any*]
