Skip to content

Allow Keyword aggregation in SeriesGroupBy #26512

Closed
@TomAugspurger

Description

@TomAugspurger

Followup to #26399

In [1]: df = pd.DataFrame({'A': [1, 1, 1, 2, 2], 
   ...:                      'B': range(5), 
   ...:                      'C': range(5)})                                    

In [2]: df                                     
Out[2]: 
   A  B  C
0  1  0  0
1  1  1  1
2  1  2  2
3  2  3  3
4  2  4  4

In [3]: df.groupby('A').B.agg(foo='count')                                                        
Out[3]: 
   foo
A     
1    3
2    2

#26399 (review)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BlockerBlocking issue or pull request for an upcoming releaseGroupby

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions