Anyone knows how to pass arguments in a groupby.agg() with multiple functions?
Bottom line, I would like to use it with a custom function, but I wi
df1 = df.groupby('lvl_1')['value'].agg(['min','max',("custom_quantile",lambda x: x.quantile(q))])
for q=0.22, the output is:
min max custom_quantile lvl_1 di 0.275401 0.530000 0.294589 fi 0.054363 0.848818 0.136555