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
.
Install the python dependencies used for development:
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.4.tar.gz
.
File metadata
- Download URL: polars_tdigest-0.1.4.tar.gz
- Upload date:
- Size: 25.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84fb3c9fc3443ecc51f771cfad5c027b67402418fa1f65b72bcadfd7a20a55ee |
|
MD5 | 47069bc346f4da7bf6802fdc9a4d7788 |
|
BLAKE2b-256 | b9a4dff62ce7d9da9d7e3c09611dc4200d3ecc263f8da918e0069db0979865f2 |
File details
Details for the file polars_tdigest-0.1.4-cp38-abi3-win_amd64.whl
.
File metadata
- Download URL: polars_tdigest-0.1.4-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 | b2c901fced890c664b90d028ec991487f33cad5c0e1d2213df5a1e2a618f491d |
|
MD5 | 0006f1090a8ee6557700a91da935fbcf |
|
BLAKE2b-256 | 7fcd9d26f4194130f2957fb42512a5c929b8bcf862a4120f77180563f2e20e46 |
File details
Details for the file polars_tdigest-0.1.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: polars_tdigest-0.1.4-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 | aa237fe9bbb38cea5b93b2e7009b0248111b6b460c16f7844504d7531b202503 |
|
MD5 | 6ca1f4c9447b7f28d12190e91a048584 |
|
BLAKE2b-256 | d6d7b14f6dd3b9329c5cefe90ae26cc4a0b962efcb531c0bfe469f088b53cacf |
File details
Details for the file polars_tdigest-0.1.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: polars_tdigest-0.1.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 4.3 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 | cf4169adf476fdb51b79aba5f40fc7e580fc8d27113c3d5f7f8b7a364d71756b |
|
MD5 | b128875bb60c099901b5dea7f29f64ea |
|
BLAKE2b-256 | 2f06f2bd3db0a1acd9d25ff3daf48c717fa2f2b9a20791356640adb71a551fec |
File details
Details for the file polars_tdigest-0.1.4-cp38-abi3-macosx_11_0_arm64.whl
.
File metadata
- Download URL: polars_tdigest-0.1.4-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 | 1984cfa7beb6d8d7acf7966f13cf43a16167ea14798e8478a31912fcc7700f8b |
|
MD5 | c0a28925aecf99601e96618375c3ecec |
|
BLAKE2b-256 | 5d435ae0d94dbf3bf4adb764a94c248a1f3a0122ac08164e6a6038af4a4dba78 |
File details
Details for the file polars_tdigest-0.1.4-cp38-abi3-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: polars_tdigest-0.1.4-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 | 5239a225a0156002549e8eb5b74d4f06a9cbd78c44f86b319c69a79b955950e8 |
|
MD5 | 07231804a3ac01a0eece2623c48e8fb2 |
|
BLAKE2b-256 | a2c1a73b5657e027e719b80e00c4d1dfae8280f1ba072d53e9d1baaa65a38f6c |