Skip to main content

Run-length encoding for data analysis in Python

Project description

python-rle

Run-length encoding (wikipedia link) for data analysis in Python. Requires joblib to enable parallelized encoding. Run pip install python-rle to install.

Usage

Motivation

Base R contains a simple rle function that "computes the lengths and values of runs of equal values in a vector", as described by its docstring. I found it useful for calculating streaks in collected data, and is especially wonderful for compiling and summarizing categorical data that describes status over time. I wasn't able to find an implementation of this in Python, other than the myriad of code examples that use run-length encoding to demonstrate data compression. Hence this little utility.

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

python-rle-0.0.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

python_rle-0.0.2-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file python-rle-0.0.2.tar.gz.

File metadata

  • Download URL: python-rle-0.0.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0.post20191030 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5

File hashes

Hashes for python-rle-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8015635f2f19e2aa03606220d0e86fab20769204b6311529ea6d044fde9ffe72
MD5 f7f24b60f6bb3e1a7b46b5b25c08e087
BLAKE2b-256 e1d12ac06222bf36533da44aada3cdb7f5ece6fb48a619e8c6df57cfa161104c

See more details on using hashes here.

File details

Details for the file python_rle-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: python_rle-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0.post20191030 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5

File hashes

Hashes for python_rle-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e8947a4f5de0f163bb69351349b7e069ad16706903f54d9b411117b8669eb6fc
MD5 9b4cc9fae1a04a02599474d50cfcfb4a
BLAKE2b-256 765f5368bfb7aaa5a056623a56bd20bb85006f3e68e1e8db751cb9dbb389ffbf

See more details on using hashes here.

Supported by

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