How to get the unique pairs from the given data frame column with file handling?
问题 sample data from dataframe: Pairs (8, 8), (8, 8), (8, 8), (8, 8), (8, 8) (6, 7), (7, 7), (7, 7), (7, 6), (6, 7) (2, 12), (12, 3), (3, 4), (4, 12), (12, 12) ``` new_col = [] for e in content.Pairs: new_col.append(list(dict.fromkeys(e))) content['Unique'] = new_col ``` output expected is unique pairs from Pair column like this: (8, 8),(6, 7),(7, 6),(7, 7),(2, 12) so on what I am getting is this result when trying the above code: Unique ['8', ''] ['6', '7', ''] ['2', '12', '3', '4', ''] what is