- 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
- col_selectorColumnSelector
- prev_output_schemaOptional[Schema], optional
The input schema.
Instance of ColumnSelector.
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
- dfDataFrameType
Instance of ColumnSelector.
Input dataframe.
- Returns:
- DataFrameType
Transformed dataframe.
- register_morpheus_extensions()[source]
Modules