morpheus.utils.nvt

class MutateOp(*args, **kwargs)[source]
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_selectorColumnSelector

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_schemaSchema

The input schema.

col_selectorColumnSelector

Instance of ColumnSelector.

prev_output_schemaOptional[Schema], optional

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_selectorColumnSelector

Instance of ColumnSelector.

dfDataFrameType

Input dataframe.

Returns:
DataFrameType

Transformed dataframe.

register_morpheus_extensions()[source]

Modules

morpheus.utils.nvt.decorators

morpheus.utils.nvt.extensions

morpheus.utils.nvt.mutate

morpheus.utils.nvt.patches

morpheus.utils.nvt.schema_converters

morpheus.utils.nvt.transforms

© Copyright 2023, NVIDIA. Last updated on Aug 23, 2023.