Skip to main content

No project description provided

Project description

T-Digest Polars Plugin

This Polars plugin is a wrapper around the T-Digest Rust implementation. It not only provides means to compute an estimated qunatile, but exposes the tdigest creation and merging functionality so it can be used to estimate quantiles in a distributed environment.

For an example see the Yellow Taxi Notebook. Note that this example is a bit artifical as it doesn't distribute the computation. It is mainly meant to show how to use the plugin with multiple partitions of a dataset. It does not make sense to use this plugin for computations on a single machine as the tdigest computation essentially adds overhead to the percentile computation and is therefore slower than computing the actual percentile.

How to contribute

Dev setup

Setup your virtual environment with a python version >=3.8, e.g. use

python -m venv .env
source .env/bin/activate
``` .
Install the python dependencies used for development:
```bash
python -m pip install -r requirements.txt

Install Rust.

Build

In order to build the package, please run maturin develop. If you want to test performance, run maturin develop --release.

Developing using cargo

Cargo commands (e.g. cargo build, cargo test) don't work out of the box. In order to use cargo instead of maturin for local development, remove extension-module from cargo.toml: replace

pyo3 = { version = "0.21.2", features = ["extension-module", "abi3-py38"] }

with

pyo3 = { version = "0.21.2", features = ["abi3-py38"] }

Commit / Release

Before committing and pushing your work, make sure to run

cargo fmt --all && cargo clippy --all-features
python -m ruff check . --fix --exit-non-zero-on-fix

and resolve any errors.

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

polars_tdigest-0.1.7.tar.gz (25.2 kB view details)

Uploaded Source

Built Distributions

polars_tdigest-0.1.7-cp38-abi3-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.8+ Windows x86-64

polars_tdigest-0.1.7-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ x86-64

polars_tdigest-0.1.7-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.2 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ ARM64

polars_tdigest-0.1.7-cp38-abi3-macosx_11_0_arm64.whl (3.6 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

polars_tdigest-0.1.7-cp38-abi3-macosx_10_12_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.8+ macOS 10.12+ x86-64

File details

Details for the file polars_tdigest-0.1.7.tar.gz.

File metadata

  • Download URL: polars_tdigest-0.1.7.tar.gz
  • Upload date:
  • Size: 25.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.7.4

File hashes

Hashes for polars_tdigest-0.1.7.tar.gz
Algorithm Hash digest
SHA256 8c3e4338ea6602c7dd38588d73317b74e9c132c5cb6691cb7a2c771c936cbcc4
MD5 03fb75c48d99152e0b6a2cd3b597d57c
BLAKE2b-256 553a706e83ee86c648d8a7a90c906f70484c9837639cf37e474544fdda97108b

See more details on using hashes here.

File details

Details for the file polars_tdigest-0.1.7-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for polars_tdigest-0.1.7-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 766afa0ddcf00449565fefd1c556f83383314dbd372f98742f7cfe8cdab7ac12
MD5 54176532302d301f4d0f5d6bb4782e55
BLAKE2b-256 0c1b3d3e07aecc3552bb74d46e3de35f38798824b8aa51d223e4f6d9dc036516

See more details on using hashes here.

File details

Details for the file polars_tdigest-0.1.7-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for polars_tdigest-0.1.7-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 85df5d28c406fe9300c19ae0bce3d3ac5791a4ffab40cee3a1a21206c14a17b2
MD5 e7ecb174de5c3c20e605caa32cc1b20e
BLAKE2b-256 008c3452fb6ed74f2787f0d808a0229966da1986fb00a7434bfd3fa10cc2aa53

See more details on using hashes here.

File details

Details for the file polars_tdigest-0.1.7-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for polars_tdigest-0.1.7-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 bf695c96923903e5e6db03543422fbccd71592fb767ddb10c7a58c05da81d4b9
MD5 bee4c11c696d0bbd2fc21598e4c44f1f
BLAKE2b-256 70ec664cf50049824406600dba67ec58e7eaf4e3066b443bea02e4d52f3672df

See more details on using hashes here.

File details

Details for the file polars_tdigest-0.1.7-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for polars_tdigest-0.1.7-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 50165208fbda88bf5506c504bdd7a7b309a83a2d940e2dcc5848327b743cdabf
MD5 3a9d0debf2cc7f75d5f2f56d01798175
BLAKE2b-256 7c2513c5938f2fa63ec859137e6a2de0401777b9515bdafa79ad219e5076cbe7

See more details on using hashes here.

File details

Details for the file polars_tdigest-0.1.7-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for polars_tdigest-0.1.7-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e24646d40d65d54812ba53377638893a298b81abd78f61818a389182b5f0ea6b
MD5 4100c2f550cb96e4e27ea80127f2e12b
BLAKE2b-256 d08c54e8bec30394352081415a5cd94ac312bcc02324eb954de33234acfd72ec

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