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

summarize #1225

Open
samukweku opened this issue Dec 18, 2022 · 0 comments
Open

summarize #1225

samukweku opened this issue Dec 18, 2022 · 0 comments

Comments

@samukweku
Copy link
Collaborator

Brief Description

I would like to propose a summarize function, similar to dplyr's summarise function and pandas' agg function, but for grouping operations, and more flexible

Example API

df.summarize(y='sum',n=lambda df: df.nth(1), by='x')

# summarize on multiple columns
df.summarize((['a','b','c'], 'sum'), by = 'x')

# replicate dplyr's across
# https://stackoverflow.com/q/63200530/7175713
# select_columns syntax can fit in nicely here
mtcars.summarize(("*t", "mean"), ("*p", "sum"), by='cyl')
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 a pull request may close this issue.

1 participant