I have a dataset containing four columns similar to the first four columns shown below. I want to add another column that shows the geometric mean of the values in 'price' for certain groups, where each group is determined by the column 'type'.
How can I do this? The result would be a column like the one labeled 'geomean_price_bytype' below.
