NVIDIA Morpheus (24.06)
(Latest Version)

morpheus.utils.nvt.mutate.MutateOp

class MutateOp(*args, **kwargs)[source]

Bases: nvtabular.ops.operator.Operator

Attributes
label

Get the label of the MutateOp instance.

Methods

__call__(*args, **kwargs) Call self as a function.
column_mapping(col_selector) Generate a column mapping.
compute_output_schema(input_schema, col_selector) Compute the output schema.
transform(col_selector, df) Apply the transformation function on the dataframe.
column_mapping(col_selector)[source]

Generate a column mapping.

Parameters
col_selector

Instance of ColumnSelector.

Returns
Dict[str, str]

Dictionary of column mappings.

compute_output_schema(input_schema, col_selector, prev_output_schema=None)[source]

Compute the output schema.

Parameters
input_schema

The input schema.

col_selector

Instance of ColumnSelector.

prev_output_schema

Previous output schema, by default None.

Returns
Schema

The output schema.

property label

Get the label of the MutateOp instance.

Returns
str

The label of the MutateOp instance.

transform(col_selector, df)[source]

Apply the transformation function on the dataframe.

Parameters
col_selector

Instance of ColumnSelector.

df

Input dataframe.

Returns
DataFrameType

Transformed dataframe.

Previous morpheus.utils.nvt.mutate
Next morpheus.utils.nvt.patches
© Copyright 2024, NVIDIA. Last updated on Jul 8, 2024.