Im super new to python, but found a way to do this by collecting all the unique groups into a list and filtering out those that were not uniquely displayed:
data = pd.DataFrame({'Col_1': ['A', 'B', 'B', 'C', 'C', 'C'], 'Col_2': [11,12,12,13,13,14]}) combos = [] for x, y in enumerate(range(len(data['Col_1']))): combo = '%s_%s' %(data['Col_1'][x], data['Col_2'][x]) combos.append(combo) data.index = data['Col_1'] for item in combos: if len([comb for comb in combos if item[2:] in comb[2:]]) != len([comb for comb in combos if item[0] in comb[0]]): data = data.drop(item[0]) data.reset_index(drop=True)
source share