Closed
Description
Right now when I want to have expanding operate at the level of a group I have to apply a convenience function like so:
def expanding_sum(s):
return s.expanding().sum()
expanded_sum = df.groupby('mygroup')['mynum'].apply(expanding_sum)
Would be nice to be able to call a method directly on a groupby object:
expanded_sum = df.groupby('mygroup')['mynum'].expanding().sum()