Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pola-rs
GitHub Repository: pola-rs/polars
Path: blob/main/py-polars/tests/unit/operations/test_hash.py
6939 views
1
import polars as pl
2
3
4
def test_hash_struct() -> None:
5
df = pl.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]})
6
df = df.select(pl.struct(pl.all()))
7
assert df.select(pl.col("a").hash())["a"].to_list() == [
8
13234032676922527816,
9
14038929224386803749,
10
13596073670754281839,
11
]
12
13