aggregate(func, columnName = "aggregation") {
        return this.df.__newInstance__(
            [...this].map(({ group, groupKey }) => ({
                ...groupKey,
                [columnName]: func(group, groupKey)
            })),
            [...this.on, columnName]
        );
    }
Create an aggregation from a function.
@param {Function} func The aggregation function.
@param {String} [columnName='aggregation'] The column name created by the aggregation.
@returns {DataFrame} A new DataFrame with a column 'aggregation' containing the result.
@example
groupedDF.aggregate(group => group.stat.sum('column1'));