Skip to main content

binary_operations

Binary (two reference arguments) transformations.

This module contains the base class and concrete classes for binary transformations, those that can take two reference arguments (i.e. column or transformation names).

Classes

AdditionTransformation

class AdditionTransformation(    *,    name: Optional[str] = None,    output: bool = False,    arg1: str,    arg2: Union[float, str],):

Represents the addition of two columns or of a constant to a column.

Method generated by attrs for class AdditionTransformation.

Variables

  • static arg1 : str
  • static arg2 : Union[float, str]

BinaryOperation

class BinaryOperation(    *, name: Optional[str] = None, output: bool = False, arg1: Any, arg2: Any,):

Base two-arg transformation.

The base abstract class for all Binary Operation Transformations.

Arguments

  • arg1: The first argument
  • arg2: The second argument

Method generated by attrs for class BinaryOperation.

Variables

  • static arg1 : Any
  • static arg2 : Any

ComparisonTransformation

class ComparisonTransformation(    *,    name: Optional[str] = None,    output: bool = False,    arg1: str,    arg2: Union[float, str],):

Represents the comparison between two columns or of one column and a constant.

The resulting output should be:

  • -1 if arg1 < arg2
  • 0 if arg1 == arg2
  • +1 if arg1 > arg2

Method generated by attrs for class ComparisonTransformation.

Variables

  • static arg1 : str
  • static arg2 : Union[float, str]

DivisionTransformation

class DivisionTransformation(    *,    name: Optional[str] = None,    output: bool = False,    arg1: str,    arg2: Union[float, str],):

Column division transformation.

Represents the division of one column by another or of one column by a constant.

Method generated by attrs for class DivisionTransformation.

Variables

  • static arg1 : str
  • static arg2 : Union[float, str]

MultiplicationTransformation

class MultiplicationTransformation(    *,    name: Optional[str] = None,    output: bool = False,    arg1: str,    arg2: Union[float, str],):

Represents the multiplication of two columns or of a column and a constant.

Method generated by attrs for class MultiplicationTransformation.

Variables

  • static arg1 : str
  • static arg2 : Union[float, str]

NumericBinaryOperation

class NumericBinaryOperation(    *,    name: Optional[str] = None,    output: bool = False,    arg1: str,    arg2: Union[float, str],):

Base two-arg operation involving numbers.

This class represents any BinaryOperation where arg2 can be numeric or a second column name such as addition, multiplication, etc.

Arguments

  • arg1: The first argument (column name).
  • arg2: The second argument (column name or numeric value).

Method generated by attrs for class NumericBinaryOperation.

Variables

  • static arg1 : str
  • static arg2 : Union[float, str]

SubtractionTransformation

class SubtractionTransformation(    *,    name: Optional[str] = None,    output: bool = False,    arg1: str,    arg2: Union[float, str],):

Column subtracting transformation.

Represents the subtraction of one column from another or of a constant from a column.

Method generated by attrs for class SubtractionTransformation.

Variables

  • static arg1 : str
  • static arg2 : Union[float, str]