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