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
Built Distributions
File details
Details for the file polars_tdigest-0.1.6.tar.gz
.
File metadata
- Download URL: polars_tdigest-0.1.6.tar.gz
- Upload date:
- Size: 25.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81930900b5e2cb33296eb4b3f0f9faa3f4f0f6e17c7711e3fc2030130860bd09 |
|
MD5 | c9b6e05697126ad302ac766cabe728d8 |
|
BLAKE2b-256 | 46d631e53dc84951130d904fb3d4cb95b39a236e494d568783cbc771b33b7441 |
File details
Details for the file polars_tdigest-0.1.6-cp38-abi3-win_amd64.whl
.
File metadata
- Download URL: polars_tdigest-0.1.6-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 3.7 MB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04d179458b76d0f85478adaf99eb9860fdc7f82ce25c2e4ce05977e98fad6065 |
|
MD5 | bbfd5167be13b4a48743f687bfcd140b |
|
BLAKE2b-256 | 75c6e34b1f7ecf56eb7c510b4f85f97519f6841ebbaca4cd00cf50df03ea1682 |
File details
Details for the file polars_tdigest-0.1.6-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: polars_tdigest-0.1.6-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 4.5 MB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37c95d30c2c18f343d90f26bca024a634fb2d78ef2f5a49feb5b1eea3d834690 |
|
MD5 | 04b6f777d8d4b6e70fd989702541fab4 |
|
BLAKE2b-256 | 739f6ff3c1a4e842fd85538f850a98c771e23463158f7ec9d52bcf8a1f58a4c8 |
File details
Details for the file polars_tdigest-0.1.6-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: polars_tdigest-0.1.6-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 4.2 MB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e64c4fa1a457777b6d829e2d67ab8c20cf23a278cd6ed422915a3c841b0e881e |
|
MD5 | f30bef9063075ed0d7a47ac7539b9203 |
|
BLAKE2b-256 | 5aaa1942bad98a9efcd949403e946cb5afe8ef8b88d69a36fd79680c445c9f65 |
File details
Details for the file polars_tdigest-0.1.6-cp38-abi3-macosx_11_0_arm64.whl
.
File metadata
- Download URL: polars_tdigest-0.1.6-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44193a05d5911002e2c6e482a75a359787651cdb8148221b51e0654dfdecd4a3 |
|
MD5 | 407c7bac73609648d6379cff0f5892f9 |
|
BLAKE2b-256 | 846431afe348f12148922aa083271a69a2dcd5fa7a01ea598068a0751fad1caa |
File details
Details for the file polars_tdigest-0.1.6-cp38-abi3-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: polars_tdigest-0.1.6-cp38-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 3.9 MB
- Tags: CPython 3.8+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a9a9ee56bf39a1a5ffde0d1ba5b6a24de40ca6c288a0283bd40a016985e5328 |
|
MD5 | 6b28c33770ccd04c0437044ce506575f |
|
BLAKE2b-256 | 5852a8a95bc954c1d926a9195f7741680d09e9e09586ee5449f199c0ab062827 |