-
Notifications
You must be signed in to change notification settings - Fork 367
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
Product of multiple aggregation functions and columns #2419
Comments
Ah - now I get what you wanted (my previous suggestion was ignoring the shape you wanted as I did not read your question carefully enough - sorry for this). We currently have a transpose of this using
maybe we should just add to |
That's brilliant! The |
Given this - do you think we should add the Also - while we are at it, do you think it would be good to add CC @nalimilan |
Yeah, why not add |
Agreed, then I would not add |
+1 to adding |
What do you mean by this exactly? |
While working on the pandas vs DataFrames.jl comparison doc (#2378), I encountered the use case of applying many aggregation functions over many columns.
Consider the following example:
With DataFrames.jl, we can achieve something similar as previously suggested by @bkamins and @nalimilan .
As you can see, the results are stored in single row with many columns. Essentially, if you have N functions and M columns, you end up with N x M columns. IMHO, pandas' output is nicer. So, I'm wondering if DataFrames.jl should be enhanced to allow multiple functions to be applied for multiple columns.
Here's a little code that works:
Maybe this little
agg
function can be rolled intocombine
with a signature like this?combine(df, ::Vector{Function}, ::Vector{StringOrSymbol}
Thoughts?
The text was updated successfully, but these errors were encountered: