(DEPRECATED) Returns a function that transforms non-zero and zero values with the specified functions for truthy and falsey values, respectively.
FunctionNode
| int | float, optional) – Function or value to transform the non-zero values using (default is None
leaving non-zero values
unchanged).FunctionNode
| int | float, optional) – Function or value to transform the zero values using (default is None
leaving zero values unchanged).FunctionNode
) -> FunctionNode
Column name | Type | Description |
---|---|---|
timestamp | pandas.Timestamp | Timestamp of the point |
value | float | Value of the point |
This function is Deprecated and will be removed in a future release.
Copied!1 2 3 4 5 6 7 8 9 10 11
>>> series = F.points( ... (1, 1.0), ... (2, 0.0), ... (3, 0.0), ... name="series", ... ) >>> series.to_pandas() timestamp value 0 1970-01-01 00:00:00.000000001 1.0 1 1970-01-01 00:00:00.000000002 0.0 2 1970-01-01 00:00:00.000000003 0.0
Copied!1 2 3 4 5 6
>>> transformed_series = F.where(true=series * 2, false=-1)(series) >>> transformed_series.to_pandas() timestamp value 0 1970-01-01 00:00:00.000000001 2.0 1 1970-01-01 00:00:00.000000002 -1.0 2 1970-01-01 00:00:00.000000003 -1.0