Returns a function that calculates the per-second value change for a single time series.
For every point in the time series, starting from the second point, output a tick with the derivative of the value of the previous point in time. Each value is scaled to a per-second rate irrespective of the original frequency at which the ticks are stored.
FunctionNode
) -> FunctionNode
Column name | Type | Description |
---|---|---|
timestamp | pandas.Timestamp | Timestamp of the point |
value | float | Value of the point |
This function is only applicable to numeric series.
Copied!1 2 3 4 5 6 7 8 9 10
>>> series = F.points( ... (100, 100.0), (120, 200.0), (130, 230.0), (166, 266.0), (167, 366.0), name="series" ... ) >>> series.to_pandas() timestamp value 0 1970-01-01 00:00:00.000000100 100.0 1 1970-01-01 00:00:00.000000120 200.0 2 1970-01-01 00:00:00.000000130 230.0 3 1970-01-01 00:00:00.000000166 266.0 4 1970-01-01 00:00:00.000000167 366.0
Copied!1 2 3 4 5 6 7
>>> derivative_series = F.derivative()(series) >>> derivative_series.to_pandas() timestamp value 0 1970-01-01 00:00:00.000000120 5.000000e+09 1 1970-01-01 00:00:00.000000130 3.000000e+09 2 1970-01-01 00:00:00.000000166 1.000000e+09 3 1970-01-01 00:00:00.000000167 1.000000e+11