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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8+ Windows x86-64

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

Uploaded CPython 3.8+ macOS 11.0+ ARM64

polars_tdigest-0.1.5-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.5.tar.gz.

File metadata

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

File hashes

Hashes for polars_tdigest-0.1.5.tar.gz
Algorithm Hash digest
SHA256 8f331e64925327588acc97f4b22ee265574261d01ac827341a77d1bce38985ec
MD5 29eddf8ed463a7eab24aa1cd74545b10
BLAKE2b-256 1bb6ddc326dafb79fa7c949098efb5ff14ec06e101740a668edf97fd13138f88

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_tdigest-0.1.5-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 de5f51ceb32e095b5137ed28762b5798d5c797d5c4b5fbd0be82c25566d388db
MD5 68fcc08b45f8408e4109c412bc5dc9aa
BLAKE2b-256 2d50c8f41cc9dd7f1bd194462209c2bd79b6576bf2dd1f4d2fa8f7873d9bfda1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_tdigest-0.1.5-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bc96b04f3f8d0deb8957bf2aa226b77f40b644ecf2b428075f66a3bdd9f2c0e5
MD5 4fe8ed221f143317e09beeb00ead3050
BLAKE2b-256 f963e52698192a6cf1e3fd87933e13f0e09386cd66a5a84a8c3ac2d2b3bfcac6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_tdigest-0.1.5-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d0d4eaaac7b8cf7dba5afe66fba7a759b21bab7bc36158acb80fa79c538bf3de
MD5 a3c8ab78faa1980886586406637ae4f7
BLAKE2b-256 990f52b94dc37af1fd1eac3f921c8b79fecf2db80dfce9f87a4195d2de8eb2ee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_tdigest-0.1.5-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 371ca4bc0d51b21a01017f2ab21a5d8fa750eba95b6297f354303ce4ba3c86b5
MD5 466a7d3fbe164d5463b7b9022a2e78a3
BLAKE2b-256 f7154e488245c039c452dc35f952853ab7627e58696a66d905cdb8ef6b9d1d83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_tdigest-0.1.5-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0ec7583546c3994697cd19c14969f0ac4164964540f4c444c51d581a77783c7d
MD5 e19c7e7884df0d04ea87c0d58ca27120
BLAKE2b-256 9270a7efc7cbad52547857f0960a410a42d64bd87f1b1ffd7edc7f66745deaa8

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