{"id":24499,"library":"quantile-python","title":"quantile-python","description":"Python Implementation of Graham Cormode and S. Muthukrishnan's Effective Computation of Biased Quantiles over Data Streams in ICDE'05. Version 1.1 is the latest stable release. The library has a low release cadence with no recent updates; it provides an efficient algorithm for computing biased quantiles over data streams.","status":"active","version":"1.1","language":"python","source_language":"en","source_url":"https://github.com/matttproud/python_quantile_estimation","tags":["quantile","streaming","data-streams","sketch"],"install":[{"cmd":"pip install quantile-python","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"The correct import uses underscores, not hyphens.","symbol":"QuantileEstimator","correct":"from quantile_python import QuantileEstimator"},{"note":"StreamSummary is another key class for stream quantile estimation.","symbol":"StreamSummary","correct":"from quantile_python import StreamSummary"}],"quickstart":{"code":"from quantile_python import QuantileEstimator\n\n# Create an estimator with a desired error epsilon (epsilon = 0.001 means about 0.1% error)\nestimator = QuantileEstimator(epsilon=0.001)\nfor value in range(1000):\n    estimator.insert(value)\n\n# Get quantiles: 0.5 (median), 0.9, 0.99\nprint(\"Median:\", estimator.query(0.5))\nprint(\"90th percentile:\", estimator.query(0.9))\nprint(\"99th percentile:\", estimator.query(0.99))","lang":"python","description":"Demonstrates creating a QuantileEstimator, inserting values, and querying quantiles."},"warnings":[{"fix":"Use 'from quantile_python import QuantileEstimator'.","message":"The import path uses underscores (quantile_python), not hyphens. Importing with hyphens (quantile-python) will raise ModuleNotFoundError.","severity":"gotcha","affected_versions":"all"},{"fix":"Start with epsilon=0.01 or higher for large streams.","message":"The epsilon parameter controls the memory-accuracy tradeoff; very small epsilon (e.g., 0.0001) may cause excessive memory usage or slow insertions.","severity":"gotcha","affected_versions":"all"},{"fix":"Test with your Python version; consider switching to alternative libraries like tdigest if compatibility issues arise.","message":"The library has not been updated since 1.1 (released ~2022). It depends on Python standard libraries only but may not support newer Python versions if breaking changes occur.","severity":"deprecated","affected_versions":">=1.1"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'import quantile_python' instead of 'import quantile-python'.","cause":"Importing the package using hyphens instead of underscores.","error":"ModuleNotFoundError: No module named 'quantile-python'"},{"fix":"Use 'from quantile_python import QuantileEstimator'.","cause":"Misspelled class name (e.g., quantileestimator) or wrong import style.","error":"AttributeError: module 'quantile_python' has no attribute 'QuantileEstimator'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}