Feature Type
-
[ ] Adding new functionality to pandas
-
[x] Changing existing functionality in pandas
-
[ ] Removing existing functionality in pandas
Problem Description
The default sorting of groups is not relevant for most use cases and adds significant overhead for large dataframes. I find myself adding sort=False
more often than not and am wondering if other users have a similar experience. As a rule of thumb, functions should reasonably do the minimum work needed by default and leave overhead functionality to non-default flags.
Feature Description
In pandas/core/frame.py#L9155
:
def groupby(..., sort: bool = False, ...):
...
Alternative Solutions
from functools import partial
partial(df.groupby, sort=False)
Additional Context
No response