Imputation
v0.4.0Missingness reports per column and per pattern, plus nine imputation strategies: constant, mean, median, mode, linear, ffill, bfill, KNN and MICE-lite.
Overview
All functions accept pandas and polars DataFrames (polars is converted, imputed and converted back), never mutate the input, and work on a copy. Auto-detected targets are the columns that actually contain missing values.
Functions
missing_report
missing_report(data) -> MissingReport
MissingReport
impute
impute(data, strategy='mean', columns=None, value=None, n_neighbors=5, max_iter=10, tol=1e-3, seed=None) -> DataFrame
DataFrame (same engine as the input)
KNN strategy
strategy='knn', n_neighbors=5
MICE-lite strategy
strategy='mice', max_iter=10, tol=1e-3
MissingReport
MissingReport
per_column · patterns · n_rows · n_complete_rows · total_missing · to_dataframe() · to_dict() · to_markdown() · to_json()