I have selected two columns in a groupby object. How do I apply a true or false filter on one and then apply a function on the other?
Say I have the Airbnb dataset with a bunch of columns. Of interest are ‘neighbourhood_cleansed’, ‘host_is_superhost’ and ‘price’. I wish to find the neighbourhood in which the difference between the median prices of superhosts and non-superhosts is the maximum.