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

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

polars_tdigest-0.1.10-cp38-abi3-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.8+Windows x86-64

polars_tdigest-0.1.10-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.1 MB view details)

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

polars_tdigest-0.1.10-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.8 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

polars_tdigest-0.1.10-cp38-abi3-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

polars_tdigest-0.1.10-cp38-abi3-macosx_10_12_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for polars_tdigest-0.1.10.tar.gz
Algorithm Hash digest
SHA256 b8f19c5c7496873ae5bd7a58e444f513117bd4733ba435755f9da9888a7edb18
MD5 f8ab9afe9c2b68a8513b3a848acbc71f
BLAKE2b-256 2f931623b304a5655f1479ea18675d5afbe6c11fa1c2cb1e5662f61e995311eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_tdigest-0.1.10-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 fc38ec3afba5fb43866576675792fcc0d46d369751c09a8ae07b17edd2bc9749
MD5 a18bba06d8d6178181affd5589dc9c53
BLAKE2b-256 389f4b1bb48c50f1f213a616d894353382254b3a812b19bfb1cceddb3e67af75

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_tdigest-0.1.10-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fd306e70c6e57bb636e8f477c26be7299c9cbce42febe95def0b8b9a2992745f
MD5 b912f7c98e5eeea9a9561a274b607ff6
BLAKE2b-256 564e587ce306069e380f9b0fea8c55e6fd4256db5be09deacb4f467b9998e4a6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_tdigest-0.1.10-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3d349cd03a55cb20d5e8500695183cd0b34093a062a61d2457f0d21de347e1a7
MD5 94f98b10c87095bedf99312752dda57e
BLAKE2b-256 e23c7cb3efecea9c3e7b86d1897ea45934fade54283b2274126843e511617bf5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_tdigest-0.1.10-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 db07f30d1fdf633a8f9b5122a574d5193adebf6b07259ec1a839662b79b460e2
MD5 99c568a3986aa785251eae8610015e2c
BLAKE2b-256 cb6743c63e06810f9ab2e4d205a80c5077a7089988495600bc664f79c34b4e81

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_tdigest-0.1.10-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 55092b9f38734d8dcf3f4fec99a7484ccd22a0e1520487078a46359bcfff512f
MD5 2c1558e05f0cd7caabcd06100cb0e072
BLAKE2b-256 8ebc5fdda2c67e842eb23f547ca465f071cc7adaec483ae0e68a4ef797b254f8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page