Skip to main content

Imputes missing data like a linear equation

Project description

README

Introduction

It only contains one function which accept a dataframe with missing values and replace the NaNs with mean value of the value around these NaNs. The imputation is linear, e.g. [nan,nan,5,8] => [-1,2,5,8], [3,nan,nan,9] => [3,5,7,9], [1,5,nan,nan] => [1,5,9,13]

Currently only DataFrame is accepted, I may consider to support any arrry-like object in the future.

Tips

  1. This is actually a package for practice packaging in python. So there may be problems with the algorithm and the algorithm may not be efficient.
  2. There should be at least 2 non-nan value in the input, otherwise the original DataFrame will be returned.
  3. Only float point number is tested, so be careful if use this function with other value types

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

myimpute-0.1.1.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

myimpute-0.1.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file myimpute-0.1.1.tar.gz.

File metadata

  • Download URL: myimpute-0.1.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0.post20201207 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

File hashes

Hashes for myimpute-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e29c96f3a379d65b81b4639262e7ecce3f08f3e1b06323eccb1a41dd19ce3db3
MD5 54ab6a132cc8f7d2edccebc855e3ffc4
BLAKE2b-256 112ec6f9dfddf86cc17a826c76189b8fdadae5efc3a439d4d01cc153ee053756

See more details on using hashes here.

File details

Details for the file myimpute-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: myimpute-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0.post20201207 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

File hashes

Hashes for myimpute-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cbcf9beca4a46ec7bf473cb010cde7cb8b37a20d0be7a93fd674273c86dfdf37
MD5 d823cd697c9c696e61b5dff2a8ea7d02
BLAKE2b-256 d95c59a506f8abf0fc2318cca5ae5b39d59868c54c0958b0ad222d7a8e2f69c1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page