Hash and combine the rows in this DataFrame
Description
The hash value is of type UInt64.
Usage
<DataFrame>$hash_rows(seed = 0)
Arguments
seed
|
Random seed parameter. Defaults to 0. |
Details
This implementation does not guarantee stable results across different Polars versions. Its stability is only guaranteed within a single version.
Value
A polars Series
Examples
library("polars")
df <- pl$DataFrame(
foo = c(1, NA, 3, 4),
ham = c("a", "b", NA, "d")
)
df$hash_rows(seed = 42)
#> shape: (4, 1)
#> ┌──────────────────────┐
#> │ │
#> │ --- │
#> │ u64 │
#> ╞══════════════════════╡
#> │ 17453377068060149751 │
#> │ 12226408558654656068 │
#> │ 13881508424296595263 │
#> │ 14207384912459851279 │
#> └──────────────────────┘