Logical
polars_ta.wq.logical
Functions:
| Name | Description |
|---|---|
and_ |
Logical AND operator, returns true if both operands are true and returns false otherwise |
equal |
Returns true if both inputs are same and returns false otherwise |
if_else |
条件判断 |
is_finite |
If (input NaN or input == INF) return false, else return true |
is_nan |
If (input == NaN) return true else return false |
is_not_finite |
If (input NAN or input == INF) return true else return false |
is_not_nan |
If (input != NaN) return true else return false |
is_not_null |
If (input != null) return true else return false |
is_null |
If (input == null) return true else return false |
less |
If input1 < input2 return true, else return false |
negate |
The result is true if the converted operand is false; the result is false if the converted operand is true |
not_ |
The result is true if the converted operand is false; the result is false if the converted operand is true |
or_ |
Logical OR operator returns true if either or both inputs are true and returns false otherwise |
xor |
Logical XOR operator returns true if exactly one of the inputs is true and returns false otherwise |
and_(a: Expr, *args) -> Expr
Logical AND operator, returns true if both operands are true and returns false otherwise
equal(input1: Expr, input2: Expr) -> Expr
Returns true if both inputs are same and returns false otherwise
if_else(condition: Expr, true_value: Expr, false_value: Expr = None) -> Expr
条件判断
Notes
如果true_value或false_value使用了None,导致数据有null,
后面如再有ts_时序算子,一定要留意当前over_null值
is_finite(input1: Expr) -> Expr
If (input NaN or input == INF) return false, else return true
is_nan(input1: Expr) -> Expr
If (input == NaN) return true else return false
is_not_finite(input1: Expr) -> Expr
If (input NAN or input == INF) return true else return false
is_not_nan(input1: Expr) -> Expr
If (input != NaN) return true else return false
is_not_null(input1: Expr) -> Expr
If (input != null) return true else return false
is_null(input1: Expr) -> Expr
If (input == null) return true else return false
less(input1: Expr, input2: Expr) -> Expr
If input1 < input2 return true, else return false
negate(input1: Expr) -> Expr
The result is true if the converted operand is false; the result is false if the converted operand is true
not_(input1: Expr) -> Expr
The result is true if the converted operand is false; the result is false if the converted operand is true
or_(a: Expr, *args) -> Expr
Logical OR operator returns true if either or both inputs are true and returns false otherwise
xor(a: Expr, b: Expr) -> Expr
Logical XOR operator returns true if exactly one of the inputs is true and returns false otherwise