I'm looking for shortering the code where I don't need to repeat multiple lambda functions. This code is working, want to optimize further. Any help would be appreciated.
for col in col_list:
f = { col: [lambda x: x.quantile(0.01), lambda x: x.quantile(0.05), lambda x: x.quantile(0.10), lambda x: x.quantile(0.15),
lambda x: x.quantile(0.20), lambda x: x.quantile(0.25), lambda x: x.quantile(0.30), lambda x: x.quantile(0.35)
]}
grpby_df = df.groupby('grpbycol').agg(f)