skillfed

missingpy

Missing Data Imputation for Python

missingpy v0.2.0 296.2K downloads/30d#7,901 on PyPI246
Copyleft license DORMANT released

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 missingpy

uv

uv add missingpy

poetry

poetry add missingpy

Installing 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

License :: OSI Approved :: GNU General Public License v3 (GPLv3)Operating System :: OS IndependentProgramming Language :: Python :: 3

Tags

missing data imputationknn imputationrandom forest imputationhandle missing valuesdata preprocessing missingmissforestfill nan values
data-preprocessingimputationscikit-learn-compatible

More Scientific/Engineering packages