A Python library providing stable non-cryptographic and cryptographic hashing functions for Polars DataFrames. Version 0.5.6 supports algorithms like xxhash, murmurhash3, farmhash, SHA3 SHAKE128, UUID5, and H3 spatial index. It integrates directly into Polars expressions via `hash_` prefix. Maintained, with frequent releases.
pip install polars-hashVerified import paths — ran on the pinned version, not inferred.
Create a Polars DataFrame and add XXH3 and MurmurHash3 hash columns.
Upgrade Polars to >=1.32.0, or pin polars-hash to <0.5.0.
Upgrade to >=0.4.9 and remove any use of `polars.type_aliases`.
Cast results explicitly: `.cast(pl.UInt64)` or `.cast(pl.Utf8)` as needed.
Provide a valid namespace: `polars_hash.hash_uuid5('namespace_uuid', 'text')`.Upgrade to >=0.5.2: `pip install polars-hash>=0.5.2`.
Use `polars_hash.hash_xxh3(...)` directly without importing the function. Correct usage: `import polars_hash; polars_hash.hash_xxh3(...)`.
Provide a UUID string: `polars_hash.hash_uuid5('6ba7b810-9dad-11d1-80b4-00c04fd430c8', 'text')`.