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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for python_rle-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8947a4f5de0f163bb69351349b7e069ad16706903f54d9b411117b8669eb6fc |
|
MD5 | 9b4cc9fae1a04a02599474d50cfcfb4a |
|
BLAKE2b-256 | 765f5368bfb7aaa5a056623a56bd20bb85006f3e68e1e8db751cb9dbb389ffbf |