Python Subset Dataframe Based Shampoo