Custom aggregations on GroupBy dataframes

Open
#388 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

Research direction

Start at the GroupBy dataframe API and compare it with the referenced streamz DataFrame aggregations documentation. Determine how a custom aggregation such as Mean() should work with grouping keys, then identify the relevant implementation and tests needed to define and verify the expected behavior.

Written by the indexing model from the issue text.

Description

Hello,

I just started using your package and I find it really great!

However I cannot find a direct way of computing a custom aggregation on a GroupBy dataframe, something like:

sdf.groupby('name').aggregate(Mean())

in the spirit of https://streamz.readthedocs.io/en/latest/dataframes.html#dataframe-aggregations
Am I missing something?

Of course I can do the groupby operation inside the aggregation and keep all the keys inside the state but it would be very convenient if the framework could handle this for me

Thanks

Dominant language
Python
Stars
1.3k
Forks
149
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from python-streamz/streamz

All issues in python-streamz/streamz

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.