Trying to run the below line
df = df.groupby(['Name', 'ID']).agg(Average_Revenue=('Amount', np.mean), Sum_Revenue=('Amount', np.sum))
but I recieve the error:
TypeError: func is expected but received tuple in **kwargs.
According to all the documentation I have looked at not sure why this is giving an error, can anyone help please
pd.__version__? named aggregation requires at least v0.25.0