'python vaex groupby with custom function
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']))
Solution 1:[1]
Unfortunately, not. There's an open issue requesting it, and the Vaex team is thinking about/working on a solution.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ben Epstein |
