Returns a function that computes the sum of all points sharing a timestamp for multiple input time series.
The resulting time series is a union of all timestamps for all the input series, where each timestamp contains the sum of values that exist across the input set for that timestamp.
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>>> series_1 = F.points( 2... (0, 0.0), 3... (100, 100.0), 4... (140, 140.0), 5... (200, 200.0), 6... name="series-1" 7... ) 8>>> series_2 = F.points( 9... (100, 200.0), 10... (120, 220.0), 11... (130, 330.0), 12... (150, 350.0), 13... (160, 460.0), 14... name="series-2" 15... ) 16>>> series_1.to_pandas() 17 timestamp value 180 1970-01-01 00:00:00.000000000 0.0 191 1970-01-01 00:00:00.000000100 100.0 202 1970-01-01 00:00:00.000000140 140.0 213 1970-01-01 00:00:00.000000200 200.0 22>>> series_2.to_pandas() 23 timestamp value 240 1970-01-01 00:00:00.000000100 200.0 251 1970-01-01 00:00:00.000000120 220.0 262 1970-01-01 00:00:00.000000130 330.0 273 1970-01-01 00:00:00.000000150 350.0 284 1970-01-01 00:00:00.000000160 460.0
Copied!1>>> sum_series = F.sum()([series_1, series_2]) 2>>> sum_series.to_pandas() 3 timestamp value 40 1970-01-01 00:00:00.000000000 0.0 51 1970-01-01 00:00:00.000000100 300.0 62 1970-01-01 00:00:00.000000120 220.0 73 1970-01-01 00:00:00.000000130 330.0 84 1970-01-01 00:00:00.000000140 140.0 95 1970-01-01 00:00:00.000000150 350.0 106 1970-01-01 00:00:00.000000160 460.0 117 1970-01-01 00:00:00.000000200 200.0