Skip to content

Count not being supported in multiset agg function #358

@HYPERTONE

Description

@HYPERTONE

GroupByOps has AggNames listed as a set:
AggNames = { "count", "cumsum", "cummin", "cummax", "first", "last", "max", "mean", "median", "min", "nanmax", "nanmean", "nanmedian", "nanmin", "nanstd", "nansum", "nanvar", "nth", "std", "sum", "var", }

However, upon performing a groupby with 'count', the following occurs:
dataset.groupby(['Category', 'SubCategory']).agg({'Identifier' : 'count', 'Value' : 'max'})

TypeError: count() takes 1 positional argument but 2 were given

This can similarly be done in pandas via the following:

df.groupby(['Category', 'SubCategory']).agg({'Identifier' : 'count', 'Value' : 'max'})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions