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'
ColumnRemoverRecord 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
ColumnRemoverReturn 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'
ColumnRemoverRemove 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'
BaseConverterIndicate 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]'
BaseConverterGet 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
ConfigObjectGenerates the component related Json Schema.
Returns
- dict
- Dictionary representing the Json Schema of the component.
validate_and_transform(self, raw_data: dict) -> dict
ConfigObjectIt 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.