LogOp
-
class
nvtabular.ops.LogOp[source] Bases:
nvtabular.ops.operator.OperatorThis 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 justlog(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
- 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
-
property
output_dtype
-