Python Subset Dataframe Based On Column Refolding