apply a function to a pandas dataframe whose returned value is based on other rows,"df.groupby(['item', 'price']).region.apply(f)"