bughelp wanted
倉庫指標
- Star
- (562 star)
- PR 合併指標
- (PR 指標待抓取)
描述
Moved from: https://github.com/eitsupi/neo-r-polars/issues/339
Python polars and old r-polars return dataframes with different row order, but the rewritten polars returns all dataframes identically sorted:
import polars as pl
n_obs = 6
df = pl.LazyFrame({
"feature": ["b", "b", "c", "c", "a", "a"],
"value": list(range(n_obs)),
})
for i in range(10):
print(
df.group_by("feature").agg([
pl.col("value").mean(),
]).collect()
)
df = pl$LazyFrame(
feature = c("b", "b", "c", "c", "a", "a"),
value = 1:6,
)
for (i in 1:10) {
print(
df$group_by("feature")$agg(
pl$len(),
pl$col("value")$mean(),
)$collect()
)
}