NanRemover
Remove rows that contain NaN (or null-like) values in the scoped columns.
Only the columns selected in scope are scanned for nulls; rows with nulls in
those columns are dropped from the dataset. String representations of null such
as "None", "nan", "N/A" are also treated as missing.
Methods
changes_row_count(self) -> bool
NanRemoverReturn True because this converter removes rows with null values.
Returns
- bool
- Always
True.
fit(self, x: 'DashAIDataset', y: 'DashAIDataset' = None) -> 'NanRemover'
NanRemoverRecord the scoped column names and their types for use in transform.
Parameters
- x : DashAIDataset
- The scoped dataset whose column names and types are stored.
- y : DashAIDataset, optional
- Ignored. Defaults to None.
Returns
- NanRemover
- The fitted converter instance (self).
get_output_type(self, column_name: str = None) -> DashAI.back.types.dashai_data_type.DashAIDataType
NanRemoverReturn the preserved type for a column, or a Text placeholder.
Parameters
- column_name : str, optional
- Name of the column to look up. Defaults to None.
Returns
- DashAIDataType
- The original type stored during
fitif available; otherwise a Text type backed bypyarrow.string().
transform(self, x: 'DashAIDataset', y: 'DashAIDataset' = None) -> 'DashAIDataset'
NanRemoverDrop all rows containing null or null-like values in the scoped columns.
Parameters
- x : DashAIDataset
- The dataset to clean.
- y : DashAIDataset, optional
- Ignored. Defaults to None.
Returns
- DashAIDataset
- A new dataset with null-containing rows removed.
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.