Skip to main content

Native Polars expressions for histogram distribution statistics

Project description

polars-distr

Native Polars expressions for statistics over histogram distributions. The plugin computes means, CDF values, quantiles, and exact CRPS inside lazy and streaming query plans without Python UDFs. histogram() gives the unchanged Struct{counts, edges} storage a logical histogram dtype that survives lazy plans and Parquet round trips.

Install with uv add polars-distr or pip install polars-distr.

import polars as pl
import polars_distr as pld  # registers the Histogram dtype

result = (
    pl.scan_parquet("histograms.parquet")
    .select(
        pld.quantiles("distribution", [0.1, 0.5, 0.9]).alias("quantiles"),
        pld.crps("distribution", "observation").alias("crps"),
    )
    .collect(engine="streaming")
)

Create distribution from raw columns with pld.histogram("counts", "edges"); once written to Parquet, it loads back as a histogram column.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

polars_distr-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ x86-64

polars_distr-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl (6.4 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ ARM64

polars_distr-0.1.0-cp311-abi3-macosx_11_0_arm64.whl (5.9 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

File details

Details for the file polars_distr-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for polars_distr-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 21a7cec5f92d65cf3079e1ee48e3db5ee1ed847f4fd66663811c75251175ab3b
MD5 810b583954aa2344ca893f7ca2fc5a8b
BLAKE2b-256 34f7eec6cc08841faab9aa7030a1cd50a2e04aec841a46a1018ca0eefbdf807b

See more details on using hashes here.

Provenance

The following attestation bundles were made for polars_distr-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl:

Publisher: release.yml on silurian-ai/polars-distr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file polars_distr-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for polars_distr-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3b19f1911d8cfab256e4793528ee287d7a9224bb138e97265b37d0b7584448fa
MD5 897a937b83072532aba77bcf3c8ee990
BLAKE2b-256 0f9499c08a4455fc4557a7c6257b658f55949f02d1acf5923df87b741ab13eee

See more details on using hashes here.

Provenance

The following attestation bundles were made for polars_distr-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl:

Publisher: release.yml on silurian-ai/polars-distr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file polars_distr-0.1.0-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for polars_distr-0.1.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0af5ba96d64d72af47976e5759c692267537e243bc76e7d4d186d8f8a9da3ce0
MD5 59af832e7a142c3109992661b3d5eed9
BLAKE2b-256 0bb2b4871fd58bce682daa42eca3f4951b47b4064f7c45005bb0abbbc00663d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for polars_distr-0.1.0-cp311-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on silurian-ai/polars-distr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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