https://github.com/macarro/imputena
Python package that allows both automated and customized treatment of missing values in datasets
https://github.com/macarro/imputena
imputation missing-data python
Last synced: 12 days ago
JSON representation
Python package that allows both automated and customized treatment of missing values in datasets
- Host: GitHub
- URL: https://github.com/macarro/imputena
- Owner: macarro
- License: mit
- Created: 2020-03-26T11:06:05.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-29T19:24:17.000Z (about 3 years ago)
- Last Synced: 2025-09-25T11:14:17.664Z (4 months ago)
- Topics: imputation, missing-data, python
- Language: Python
- Homepage:
- Size: 160 KB
- Stars: 10
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# imputena: impute missing values using Python
[](https://travis-ci.com/macarro/imputena)
[](https://imputena.readthedocs.io/en/latest/?badge=latest)
[](https://coveralls.io/github/macarro/imputena?branch=master)
[](https://pypi.org/project/imputena)
[](https://pypi.org/project/imputena)
This Python package allows both automated and customized treatment of missing
values in datasets. The treatments that are implemented are:
* Listwise deletion
* Pairwise deletion
* Dropping variables
* Random sample imputation
* Random hot-deck imputation
* LOCF
* NOCB
* Most frequent substitution
* Mean and median substitution
* Constant value imputation
* Random value imputation
* Interpolation
* Interpolation with seasonal adjustment
* Linear regression imputation
* Stochastic regression imputation
* Logistic regression imputation
* K-nearest neighbors imputation
* Sequential regression multiple imputation
* Multiple imputation by chained equations
All these treatments can be applied to whole datasets or parts of them and
allow for extensive customization. The package can also recommend a
treatment for a given dataset, inform about the treatments that are
applicable to it, and automatically apply the best treatment.
## Installation
### Most recent release
To install or update to the most recently published release, run:
```ShellSession
pip install imputena
```
This will fetch the release from PyPi and install it with all dependencies.
### Current development version
Clone this repository or download and unzip it. At the project root directory,
run:
```ShellSession
pip install .
```
## Documentation
### View online
The documentation for the latest version is available at
[imputena.readthedocs.io](https://imputena.readthedocs.io/en/latest).
### Generate locally
The documentation is generated by sphinx using the docstrings. To do so, run
either of the following commands at the `docs` directory:
```ShellSession
make html
make latexpdf
```
The generated documentation will be located in `docs/build`.
## Tests
The tests for the implemented functions are located in the `test` directory and
use the unittest package.
To execute all tests, run the following command at the project root directory:
```ShellSession
python -m unittest
```
To execute only the tests contained in a particular test class, for example
`deletion/test_delete_listwise.py`, run the following command at the
project root directory:
```ShellSession
python -m unittest test.deletion.test_delete_listwise
```