morpheus.utils.column_info.CustomColumn

(Latest Version)
class CustomColumn(name, dtype, process_column_fn, input_column_types=<factory>)[source]

Bases: morpheus.utils.column_info.ColumnInfo

Subclass of ColumnInfo, defines a column to be computed by a user-defined function process_column_fn.

Attributes
process_column_fn

A function that takes a DataFrame and returns a Series.

Methods

_process_column(df: pandas.DataFrame) -> pandas.Series Apply the process_column_fn to the DataFrame and return the result as a Series.
static convert_pandas_dtype(dtype)[source]

Return the pandas type string of column.

get_input_column_types()[source]

Return a dictionary of input column names and types needed for processing. This is used for schema validation and should be overridden by subclasses.

get_pandas_dtype()[source]

Return the pandas type string for the currently set dtype.

Previous morpheus.utils.column_info.ColumnInfo
Next morpheus.utils.column_info.DataFrameInputSchema
© Copyright 2024, NVIDIA. Last updated on Apr 25, 2024.