Skip to content

A Python library for estimating quantiles in a stream, using ClickHouse t-digest data structure.

License

Notifications You must be signed in to change notification settings

vivienm/python-tdigest-ch

Repository files navigation

tdigest-ch

A Python library for estimating quantiles in a stream, using ClickHouse t-digest data structure.

The t-digest data structure is designed around computing accurate quantile estimates from streaming data. Two t-digests can be merged, making the data structure well suited for map-reduce settings.

Documentation

Usage

Installation

Installing this package from sources requires a recent version of Rust.

pip install git+https://github.com/vivienm/python-tdigest-ch.git

Example

>>> from tdigest_ch import TDigest
>>> t = TDigest(range(1_000_001))
>>> round(t.quantile(0.99))
990000

About

A Python library for estimating quantiles in a stream, using ClickHouse t-digest data structure.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published