import polars as pl
df = pl.DataFrame(
{
"X": [4, 2, 3, 4],
"Y": ["p", "p", "p", "p"],
"Z": ["b", "b", "b", "b"],
}
)
We know the equivalent of pandas's df.drop_duplicates()
is df.unique()
in python-polars
但是,每次我执行我的查询,我得到一个不同的结果?
print(df.unique())
X Y Z
i64 str str
3 "p" "b"
2 "p" "b"
4 "p" "b"
X Y Z
i64 str str
4 "p" "b"
2 "p" "b"
3 "p" "b"
X Y Z
i64 str str
2 "p" "b"
3 "p" "b"
4 "p" "b"
这是故意的吗?背后的原因是什么?