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_type and forwards any extra keyword arguments to it.

Parameters:
  • col_series – pandas Series to fill.

  • col_type – Semantic type of the column (ColType enum).

  • **kwargs

    Extra keyword arguments forwarded to the underlying fill function:

    • NUMERICAL: strategy, fill_value — see fillna_numerical().

    • CATEGORICAL: fill_value — see fillna_categorical().

    • TEXT: fill_value — see fillna_text().

    • TIMESTAMP: strategy, fill_value — see fillna_timestamp().

    • BINARY: no extra arguments.

Returns:

Series with missing values filled. Returns a copy unchanged for unrecognised column types.