etna.transforms.BinaryOperator#
- class BinaryOperator(value)[source]#
-
Enum for mathematical operators from pandas.
Methods
perform
(df, left_operand, right_operand, ...)Perform binary operation on passed dataframe.
Attributes
"+"
"-"
"*"
"/"
"//"
"%"
"**"
"=="
"!="
"<="
"<"
">="
">"
- perform(df: DataFrame, left_operand: str, right_operand: str, out_column: str) DataFrame [source]#
Perform binary operation on passed dataframe.
If during the operation a division by zero of a positive number occurs, writes +inf to this cell of the column, if negative - -inf, if 0/0 - nan.
In the case of raising a negative number to a non-integer power, writes nan to this cell of the column.
- Parameters:
- Returns:
Column which contains result of operation
- Return type: