Closed
Description
Reason
Sometimes we want to group a datapoint by some of its domains and calculate a new datapoint. For example we have population for age 0, 1, 2, 3, ... 10 for each country and we want to calculate population_between_0_and_10. Then we need to have a procedure to group the datapoint by country/year and sum up all data.
API
groupby
groups the data in a ingredient by a key/keys and return aggregated results as new ingredient.
groupby
accepts following options:
by
: the key/keys to groupaggregate
: the function to calculate the result.