-
Notifications
You must be signed in to change notification settings - Fork 172
fix: dask group by with kwargs #1676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| def var( | ||
| ddof: int = 1, | ||
| ) -> Callable[ | ||
| [pd.core.groupby.generic.SeriesGroupBy], pd.core.groupby.generic.SeriesGroupBy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to double check the return type
|
|
||
| import dask_expr as dx | ||
|
|
||
| return partial(dx._groupby.GroupBy.var, ddof=ddof) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The minimum version we support for dask is "dask[dataframe]==2024.7", which installs dask-expr==1.1.8, and dx._groupby.GroupBy is already available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@phofl is there a public variant of this?
MarcoGorelli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome, thanks a lot @FBruzzesi !
if we can use a public variant for dask expr's groupby, then that'd probably be better, else i think this is ok (we test against their nightlies anyway)
|
Thanks for reviewing @MarcoGorelli π
It's definitly not exposed in dask-expr. As mentioned in the discourse thread we could use |
|
Just caught up with Patrick from Dask, and he's said that they plan to merge dask-expr into dask and then they'll expose some public apis, and that we can merge as-is for now |

What type of PR is this? (check all applicable)
Related issues
group_bycontext ignores expr argumentsΒ #1606 by implementing var/std with custom ddof for dask as explained in the dask discourse threadChecklist
If you have comments or can explain your changes, please do so below