You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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'})
The text was updated successfully, but these errors were encountered: