Operator

class nvtabular.ops.operator.Operator[source]

Bases: merlin.dag.base_operator.BaseOperator

Base class for all operator classes.

transform(col_selector: merlin.dag.selector.ColumnSelector, df: pandas.core.frame.DataFrame)pandas.core.frame.DataFrame[source]

Transform the dataframe by applying this operator to the set of input columns

Parameters
  • columns (list of str or list of list of str) – The columns to apply this operator to

  • df (Dataframe) – A pandas or cudf dataframe that this operator will work on

Returns

Returns a transformed dataframe for this operator

Return type

DataFrame

inference_initialize(col_selector: merlin.dag.selector.ColumnSelector, model_config: dict)Optional[nvtabular.ops.operator.Operator][source]

Configures this operator for use in inference. May return a different operator to use instead of the one configured for use during training

create_node(selector)[source]