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()
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4