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.9.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.9-cp38-abi3-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.8+Windows x86-64

polars_tdigest-0.1.9-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.9-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.9-cp38-abi3-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

polars_tdigest-0.1.9-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.9.tar.gz.

File metadata

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

File hashes

Hashes for polars_tdigest-0.1.9.tar.gz
Algorithm Hash digest
SHA256 a22872e3ac507a2f079a82bc47da4e05fad1124cf77023445c7fa5d02384dac9
MD5 b79af07cc60fb484ade14e170869f3f9
BLAKE2b-256 32c3127e9e928d953812495dd064833227ffe9bc1c67e28635f2deace6f8ca6a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_tdigest-0.1.9-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b2e43ec0ea4f59c6b0258b4107d62d0074543546b2a6bac952029ef67a939070
MD5 58dc51e5088b3ee881e5210e4c1aa76c
BLAKE2b-256 6455da3f19965f9926a5b1aa85c84c69f04411cfb8489a8693f5c445b27ba3a5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_tdigest-0.1.9-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e4320534c1b55c28a2811e61e9cc6d9078294edb5a4b3508eb194dbb1508cf3d
MD5 5aa00c00e006546e035646627e130258
BLAKE2b-256 45dc7facb5209a7ddfb0c1c9a5e60fbaa08bc8b32d71591e5b1f33e91d2ed050

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_tdigest-0.1.9-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5bef1956b522859332c36c22a883ef7fbe33dd39c675f90ce4e26057502f6650
MD5 dcda6ed0ebe3274345530de449a90dee
BLAKE2b-256 b0c41bde44ce49f05318a5972bcbaebc1323dfad2190bda53c8123db7534da34

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_tdigest-0.1.9-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2d24400c50f4e9dee8a0d6f9a5515a47778c82992385a5d982d4a1f71870a2cb
MD5 5f2fddf31deea5a3788f608872cd0a5b
BLAKE2b-256 04e95d62471baa7ef4323537b05f8a9026afda0b28954609c4033c63339f12cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_tdigest-0.1.9-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a116c59d5f077da67e5866c20e2402d559a4062c8649cbd122eb06927e59194f
MD5 1c9ec42468d4f6ddcd86a6cc1478fa6a
BLAKE2b-256 79effb5218f78f6f46eeaf9e715d8e00d4ad111041a1645ca83b76629272119d

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