class nvtabular.ops.LogOp[source]

Bases: nvtabular.ops.operator.Operator

This operator calculates the log of continuous columns. Note that to handle the common case of zerofilling null values, this calculates log(1+x) instead of just log(x).

Example usage:

# Use LogOp to define NVTabular workflow
cont_features = cont_names >> nvt.ops.LogOp() >> ...
processor = nvt.Workflow(cont_features)
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

  • 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 a transformed dataframe for this operator

Return type


property output_tags
property output_dtype