NVIDIA Morpheus (24.06)

morpheus.utils.column_info.BoolColumn

class BoolColumn(name, dtype, input_name, true_value=None, false_value=None, true_values=None, false_values=None)[source]

Bases: morpheus.utils.column_info.RenameColumn

Subclass of RenameColumn, adds the ability to map a set custom values as boolean values.

Attributes
value_map

A mapping from input values to boolean values.

true_value

The value to map to True.

false_value

The value to map to False.

true_values

A list of values to map to True.

false_values

A list of values to map to False.

Methods

_process_column(df: pandas.DataFrame) -> pandas.Series Apply the mapping and return the result as a boolean 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
Next morpheus.utils.column_info.ColumnInfo
© Copyright 2024, NVIDIA. Last updated on Jul 8, 2024.