`var` and `std` with ddof in groupby context with other aggregations

Hi @FBruzzesi,

Your problem probably comes from what is explained in this topic.

One simpler solution would be to use functools.partial:

import functools
var_ddof_2 = functools.partial(dd.groupby.DataFrameGroupBy.var, ddof=2)
df.groupby("a").agg(b_var = ("b", var_ddof_2), c_sum = ("c", "sum"))
1 Like