channel_to_series#

nominal.thirdparty.pandas.channel_to_series(channel: Channel, start: datetime | IntegralNanosecondsUTC | None = None, end: datetime | IntegralNanosecondsUTC | None = None, relative_to: datetime | IntegralNanosecondsUTC | None = None, relative_resolution: ts._LiteralTimeUnit = 'nanoseconds', *, enable_gzip: bool = True, tags: Mapping[str, str] | None = None) → pd.Series[Any]#

Retrieve the channel data as a pandas.Series.

The index of the series is the timestamp of the data. The index name is “timestamp” and the series name is the channel name.

Use relative_to and relative_resolution to return timestamps relative to the given epoch.

Example

s = channel_to_series(channel)
print(s.name, "mean:", s.mean())