question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

groupby aggregate() function for SDFs

See original GitHub issue

@martindurant, @CJ-Wright Currently, is there a way of performing an operation on SDFs involving multiple column aggregations after groupby like:

sdf.groupby('x').agg({'y':'sum', 'z':'mean'}) 

If not, any opinions on how difficult it would be to add this functionality?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
CJ-Wrightcommented, Feb 20, 2020

Full disclosure I haven’t used streaming dataframes that much, so please take that with a grain of salt

0reactions
chinmaychandakcommented, Mar 2, 2020

@cheekybastard Thanks for helping out, but I don’t think this would work, since this is not maintaining cumulative state like SDFs do. I’ll give it a try, though

Read more comments on GitHub >

github_iconTop Results From Across the Web

pandas.core.groupby.DataFrameGroupBy.aggregate
Aggregate using one or more operations over the specified axis. Transforms the Series on each group based on the given function.
Read more >
Group and Aggregate your Data Better using Pandas Groupby
Aggregation and grouping of Dataframes is accomplished in Python Pandas using “groupby()” and “agg()” functions. Apply max, min, count, distinct to groups.
Read more >
Pandas GroupBy: Group, Summarize, and Aggregate Data in ...
groupby() method allows you to aggregate, transform, and filter DataFrames. The method works by using split, transform, and apply operations. You can group...
Read more >
Comprehensive Guide to Grouping and Aggregating with ...
Pandas groupby and aggregation provide powerful capabilities for summarizing data. This article will discuss basic functionality as well as ...
Read more >
GroupBy in Pandas | Pandas Groupby Aggregate Functions
Pandas' GroupBy is a powerful and versatile function in Python. Learn about pandas groupby aggregate function and how to manipulate your ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found