A lightweight Python library for k-Nearest Neighbor imputation of missing values in datasets. Current version 0.1.0 appears to be an initial release with minimal updates; last commit on GitHub was in 2018. The library is in maintenance mode.
pip install knnimputeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic imputation of a matrix with missing values using default settings.
Use knn_impute for standard tasks; only use knn_impute_few_observed when you have many features with few observed values.
Convert categorical variables to numeric using one-hot encoding or label encoding before calling knn_impute.
Ensure missing entries are np.nan. Use np.isnan() to check or convert None to np.nan.