I have the following code:
def func(x):
return (1, 2, 3)
df.groupby[col].aggregate(func)
How to make three columns as the result of one aggregation function? I also tried returning np.array, pd.Series, but it doesn't help.
I have the following code:
def func(x):
return (1, 2, 3)
df.groupby[col].aggregate(func)
How to make three columns as the result of one aggregation function? I also tried returning np.array, pd.Series, but it doesn't help.