Module internal¶
simplify_time_series(input_ts)
¶
simplify a 1D time series object to a representation suitable for portable serialisation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input_ts |
TimeSeriesLike
|
time series |
required |
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
Dict[str,Any]: dictionary with keys "tsgeom" for the time series geometry, and "tsvalues" for its values. |
Source code in /home/per202/src/swift/bindings/python/swift2/swift2/internal.py
to_interop_univariate_series(ts, from_date=None, to_date=None)
¶
Convert an univariate python time series to a representation suitable for interoperability with a C API
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ts |
TimeSeriesLike
|
Python native time series |
required |
from_date |
ConvertibleToTimestamp
|
start timestamp of the time series to subset to. Defaults to None. |
None
|
to_date |
ConvertibleToTimestamp
|
end timestamp of the time series to subset to. Defaults to None. |
None
|
Returns:
Type | Description |
---|---|
Tuple[np.ndarray, TimeSeriesGeometryNative]
|
Tuple[np.ndarray, TimeSeriesGeometryNative]: univeriate data and time series geometry for interop. |