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.8.tar.gz (29.1 kB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8+ Windows x86-64

polars_tdigest-0.1.8-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.8-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.8-cp38-abi3-macosx_11_0_arm64.whl (3.6 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

polars_tdigest-0.1.8-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.8.tar.gz.

File metadata

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

File hashes

Hashes for polars_tdigest-0.1.8.tar.gz
Algorithm Hash digest
SHA256 f1cefd714b9b130613db60966d265dc26c701b28bc40f6ca8baba3163eb75c54
MD5 7d940defa1781ab240570a14b3629ac9
BLAKE2b-256 f76b89d29a131ae668a21d064183adc6df9a0c90f8726a06ee734a818a8b8d4f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_tdigest-0.1.8-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 72f835bb308c9c051c02aac4460ee64f278549116c489df742d103fb491eff26
MD5 122443660ab346310ea472deef20a10e
BLAKE2b-256 b2adf3b5c0fe60d0235da957db4c0821bdd8f8dfbd9224dde7031268d02a7c34

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_tdigest-0.1.8-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fffece234a206171ec405619a34fcf75402dc6874319e92a93ce3ee739d59ef5
MD5 cf2921a489523e45b5dc7a0ab3c2158d
BLAKE2b-256 e8cc1035be39a687cb422d7dc0919903a5ecf323f38f40845c4b20a1bb4f78b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_tdigest-0.1.8-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d66879ea32973fbe5b5da1685fa0af88e7eee68e3f36fceb770c450795c017fc
MD5 a4586b769ca121d52ec15a53d04e2292
BLAKE2b-256 9f5d00eaad6cc68a6a6d91ab9e98196d968a8326f41812c6a9024aa5c52f34dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_tdigest-0.1.8-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 249087f642458d64edf3455914c59843d219e82b3c3dcd6d49cf16363b256b15
MD5 e6a275872c9681bf96399f7f64056fef
BLAKE2b-256 fc5544bd23a32df0c8f254da08c70cb958b06654addcd70a38e9363eb595922c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_tdigest-0.1.8-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a1952ccc0312b671ab0caa648a37bc7053e2cd7e16009aa1395e7648c0acb837
MD5 32fc4075c454096286215748b7a8223c
BLAKE2b-256 fd3d6f89edfd06e1012f841663ad9ad6e6f3e37c92bcd75927b6e389a06ac72f

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