Skip to main content

ColumnRemover

Converter
DashAI.back.converters.simple_converters.ColumnRemover

Remove the columns selected in scope from the dataset.

The columns to be deleted are determined by the scope selection in the converter job UI: whichever columns are in scope will be removed when transform is called.

Methods

fit(self, x: 'DashAIDataset', y: 'DashAIDataset' = None) -> 'ColumnRemover'

Defined on ColumnRemover

Record the column names that will be removed during transform.

Parameters

x : DashAIDataset
The scoped dataset whose column names are the ones to be removed.
y : DashAIDataset, optional
Ignored. Defaults to None.

Returns

ColumnRemover
The fitted converter instance (self).

get_output_type(self, column_name: str = None) -> DashAI.back.types.dashai_data_type.DashAIDataType

Defined on ColumnRemover

Return a placeholder type (this converter removes columns, not transforms them).

Parameters

column_name : str, optional
Not used. Defaults to None.

Returns

DashAIDataType
A Text placeholder backed by pyarrow.string().

transform(self, x: 'DashAIDataset', y: 'DashAIDataset' = None) -> 'DashAIDataset'

Defined on ColumnRemover

Remove the columns stored during fit from the dataset.

Parameters

x : DashAIDataset
The dataset to remove columns from.
y : DashAIDataset, optional
Ignored. Defaults to None.

Returns

DashAIDataset
The dataset with the fitted columns removed.

changes_row_count(self) -> 'bool'

Defined on BaseConverter

Indicate whether this converter changes the number of dataset rows.

Returns

bool
True if the converter may add or remove rows, False otherwise.

get_metadata(cls) -> 'Dict[str, Any]'

Defined on BaseConverter

Get metadata for the converter, used by the DashAI frontend.

Parameters

cls : type
The converter class (injected automatically by Python for classmethods).

Returns

Dict[str, Any]
Dictionary containing display name, short description, image preview path, category, icon, color, and whether the converter is supervised.

get_schema(cls) -> dict

Defined on ConfigObject

Generates the component related Json Schema.

Returns

dict
Dictionary representing the Json Schema of the component.

validate_and_transform(self, raw_data: dict) -> dict

Defined on ConfigObject

It takes the data given by the user to initialize the model and returns it with all the objects that the model needs to work.

Parameters

raw_data : dict
A dictionary with the data provided by the user to initialize the model.

Returns

dict
A validated dictionary with the necessary objects.