Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement group_by_dynamic() for DataFrame and LazyFrame #691

Merged
merged 18 commits into from
Jan 14, 2024

Conversation

etiennebacher
Copy link
Collaborator

No description provided.

Comment on lines +12 to +24
test_that("groupby", {
df2 = gb$agg(
pl$col("bar")$sum()$alias("bar_sum"),
pl$col("bar")$mean()$alias("bar_tail_sum")
)$to_data_frame()

expect_equal(
df2,
data.frame(foo = c("one", "two"), bar_sum = c(9, 6), bar_tail_sum = c(4.5, 2))
)
})


Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only moved this above because otherwise RStudio doesn't provide the button "Test"

Merge branch 'main' into dynamic-group-by

# Conflicts:
#	NEWS.md
R/group_by.R Outdated Show resolved Hide resolved
Merge branch 'main' into dynamic-group-by

# Conflicts:
#	NEWS.md
#	R/group_by.R
@etiennebacher
Copy link
Collaborator Author

@eitsupi I ended up removing the attributes when we print the DynamicGroupBy and RollingGroupBy objects because if we print this class of objects, it means they are last in the pipeline, so we already have all the info about groups and other args. Maybe that's what you said in #694, I'm not sure.

@etiennebacher etiennebacher marked this pull request as ready for review January 13, 2024 17:14
R/lazyframe__lazy.R Outdated Show resolved Hide resolved
Copy link
Collaborator

@eitsupi eitsupi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@etiennebacher etiennebacher merged commit b0a70e9 into main Jan 14, 2024
31 checks passed
@etiennebacher etiennebacher deleted the dynamic-group-by branch January 14, 2024 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants