Skip to main content

pdrle

Installation

pip install pdrle

Usage

import pdrle
import pandas

x = pandas.Series(["a", "a", "b", "b", "a", "a", "a", "c"])

rle = pdrle.encode(x)
rle
#   vals  runs
# 0    a     2
# 1    b     2
# 2    a     3
# 3    c     1

y = pdrle.decode(rle.vals, rle.runs)
y
# 0    a
# 1    a
# 2    b
# 3    b
# 4    a
# 5    a
# 6    a
# 7    c
# dtype: object

pandas.concat({"x": x, "id": pdrle.get_id(x)}, axis=1)
#    x  id
# 0  a   0
# 1  a   0
# 2  b   1
# 3  b   1
# 4  a   2
# 5  a   2
# 6  a   2
# 7  c   3

pandas.concat({"x": x, "sn": pdrle.get_sn(x)}, axis=1)
#    x  sn
# 0  a   0
# 1  a   1
# 2  b   0
# 3  b   1
# 4  a   0
# 5  a   1
# 6  a   2
# 7  c   0

Metadata

Release files for pdrle 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pdrle 0.5.0
File Size Uploaded Provenance
pdrle-0.5.0.tar.gz 3.0 kB Without provenance Details

Release files / pdrle-0.5.0.tar.gz

Download URL pdrle-0.5.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f9ccf0d018c548f83b885988837044b07503d9847380fd8e40b73dd9d50c3493
BLAKE2b-256 checksum
How to use checksums
bcf3744912fd65db3dd54a638f3ce334a65a68f522dd7c61dd6337181e0dd731
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.5.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2

Security for pdrle 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page