rllm.preprocessing.fillna_by_coltype¶
- rllm.preprocessing.fillna_by_coltype(col_series: Series, col_type: ColType, **kwargs) Series[source]¶
Fill missing values based on column type. Dispatches to the appropriate fill function according to
col_typeand forwards any extra keyword arguments to it.- Parameters:
col_series – pandas Series to fill.
col_type – Semantic type of the column (
ColTypeenum).**kwargs –
Extra keyword arguments forwarded to the underlying fill function:
NUMERICAL:strategy,fill_value— seefillna_numerical().CATEGORICAL:fill_value— seefillna_categorical().TEXT:fill_value— seefillna_text().TIMESTAMP:strategy,fill_value— seefillna_timestamp().BINARY: no extra arguments.
- Returns:
Series with missing values filled. Returns a copy unchanged for unrecognised column types.