missingpy
Missing Data Imputation for Python
What it is and what it does
missingpy provides two methods for imputing missing values in numerical data arrays: k-Nearest Neighbors (KNNImputer) and Random Forest (MissForest). Both follow scikit-learn's fit/transform interface, making them familiar to users of that ecosystem. KNNImputer replaces missing values by averaging values from the k nearest neighbors; MissForest uses iterative random forest predictions, starting with the column containing the fewest missing values and working outward. The library handles both numerical and categorical variables (in MissForest) and allows configuration of neighbor counts, distance metrics, and missing-value thresholds.
The package has no external runtime dependencies, making installation straightforward. However, it has been dormant since late 2018—the latest release is 0.2.0 from December 2018, and while the repository shows a commit in February 2024, there have been no new releases. This means the codebase may not be compatible with recent versions of common libraries, and bug reports or feature requests are unlikely to receive timely attention.
Use it for:
- Preprocess datasets with missing values before feeding them into machine learning pipelines that require complete data.
- Impute missing entries in time-series or sensor data where nearest-neighbor patterns reflect realistic local structure.
- Handle mixed numerical and categorical missing data in tabular datasets using MissForest's iterative approach.
- Replace missing values in microarray or genomic data where the k-NN methodology has established validity.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Fills missing values in data arrays using k-Nearest Neighbors or Random Forest imputation, with a scikit-learn-compatible API.
Yes, if you need a lightweight, zero-dependency imputation tool and can tolerate dormant maintenance. The scikit-learn API is familiar and the code is straightforward. No, if you require active maintenance, compatibility with recent library versions, or timely bug fixes. Test thoroughly on your specific data and Python version before production use.
Install
missingpy on PyPI
pip
pip install missingpyuv
uv add missingpypoetry
poetry add missingpyInstalling missingpy
Before you install
Low install friction with no runtime dependencies. Maintenance is dormant—last release was 2018-12-10 and last commit 2024-02-29, so expect no active development or timely bug fixes.
License in practice
Licensed under GPLv3 (copyleft). Any derivative work or bundled distribution must also be open-source under compatible terms.
Quickstart
pip install missingpy
from missingpy import KNNImputer
X = [[1, 2, nan], [3, 4, 3], [nan, 6, 5], [8, 8, 7]]
imputer = KNNImputer(n_neighbors=2)
X_imputed = imputer.fit_transform(X)
Verify before relying
- Whether the package works with current versions of common numerical libraries (last release predates many ecosystem updates)
- Performance characteristics on large datasets or high-dimensional data
- Whether categorical variable support in MissForest is fully documented and stable
Package facts
| License | not declared (copyleft) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 2,804 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 296,221/month — #7,901 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: missingpy-0.2.0-py3-none-any.whl
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
miceforestPerforms Multiple Imputation by Chained…
permissive · top 15,000 on PyPI
time-aware-imputerFills missing values in time-series data while…
permissive · top 15,000 on PyPI
pynndescentPyNNDescent builds approximate nearest neighbor…
permissive · top 5,000 on PyPI
sagemaker-scikit-learn-extensionExtends scikit-learn with additional estimators…
permissive · top 15,000 on PyPI
forestciComputes confidence intervals and variance…
permissive · top 15,000 on PyPI
quantile-forestQuantile regression forests for estimating…
permissive · top 15,000 on PyPI
treeinterpreterDecomposes scikit-learn decision tree and…
permissive · top 15,000 on PyPI
ydfYDF trains, evaluates, and interprets decision…
permissive · top 15,000 on PyPI
pypotsPyPOTS provides machine learning algorithms for…
permissive · top 15,000 on PyPI
ai4tsAI4TS provides a framework for building machine…
permissive · top 15,000 on PyPI