5

Is there a way to apply a custom function to a group using the groupby function of a vaex DataFrameArray?

I can do:
df_vaex.groupby(['col_x1','col_x2','col_x3','col_x4'], agg=vaex.agg.mean(df_vaex['col_y']))

But is there a way to do pandas:
df.groupby(['col_x1','col_x2','col_x3','col_x4']).apply(lambda x: my_own_function(x['col_y']))

hatRat
  • 55
  • 4

1 Answers1

0

Unfortunately, not. There's an open issue requesting it, and the Vaex team is thinking about/working on a solution.

https://github.com/vaexio/vaex/issues/763