GEOMEAN
bhakuniv
Registered Posts: 9 ✭✭✭✭
Hi
What would be the best recipe to compute the geometric mean of comma separated values in a column. I cannot see any function in the group recipe to calculate the GEOMEAN
Thanks
VB
Best Answer
-
Hi,
We do not have that function available in the Group-by recipe.
You can consider implementing it by writing custom code in a Python recipe. There are many methods you can write the code, for example:
- Using the sciPy stats.gmean function as mentioned in https://www.geeksforgeeks.org/scipy-stats-gmean-function-python/
- Implementing it using numpy as mentioned in https://stackoverflow.com/questions/43099542/python-easy-way-to-do-geometric-mean-in-python.
Hope that helps!