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
I am using aggregations over data with groups over time, to create features. I had hoped to use the "new" namedAgg functionality to efficiently calculate and rename the many feature columns.
I find that named Aggregations only works with the "default"groupby.agg, when used with a rolling window or expanding, it's not supported.
(I note that the functions documentation doesn't mention this, the named agg is mainly in the general documentation, not method-level. i.e the groupby.agg method's documentation doesn't mention or demonstrate this functionality at all).
By "named aggregations" I refer to the functionality: animals.groupby("kind").agg(**min_height=('height', 'min')**)
When used without the window, we get the benefit of namedAggs. (The real code has many more columns and transformations and the columns the features are calculated in are dynamic, so setting a list of column names to use is not desirable. Additionally, data is time-sorted):
Is your feature request related to a problem?
I am using aggregations over data with groups over time, to create features. I had hoped to use the "new" namedAgg functionality to efficiently calculate and rename the many feature columns.
I find that named Aggregations only works with the "default"groupby.agg, when used with a rolling window or expanding, it's not supported.
(I note that the functions documentation doesn't mention this, the named agg is mainly in the general documentation, not method-level. i.e the groupby.agg method's documentation doesn't mention or demonstrate this functionality at all).
By "named aggregations" I refer to the functionality:
animals.groupby("kind").agg(**min_height=('height', 'min')**)
Describe the solution you'd like
Expand named aggregation support (NamedAgg) to the groupby aggregation used in expanding.aggregate and rolling.aggregate
API breaking implications
Should not affect it. Seems 1:1.
Additional context
Example usage/errors:
When used without the window, we get the benefit of namedAggs. (The real code has many more columns and transformations and the columns the features are calculated in are dynamic, so setting a list of column names to use is not desirable. Additionally, data is time-sorted):
The text was updated successfully, but these errors were encountered: