riptable icon indicating copy to clipboard operation
riptable copied to clipboard

GroupBy Aggregate Count TypeError

Open HYPERTONE opened this issue 3 years ago • 0 comments

Given a dataset, it can be grouped via:

group_test = rt.rt_groupby.GroupBy(new_ds, 'day')['someLatency']

Upon attempting to aggregate using AggNames= {'count', 'cumsum', 'first', 'last', 'max', 'mean', 'median', 'min', 'nanmax', 'nanmean', 'nanmedian', 'nanmin', 'nanstd', 'nansum', 'nanvar', 'nth', 'std', 'sum', 'var'} as per documentation

A TypeError is thrown:

>>> group_test.agg({'someLatency' : ['sum', 'mean', 'median', 'nth', 'count']})

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

HYPERTONE avatar Aug 25 '22 17:08 HYPERTONE