sample data from dataframe:
(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,
You could use the set method:
data = (((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)))
uniques = []
for col in data:
for unique in list(set(col)):
uniques.append(unique)
for x in uniques:
print(x)
OR:
data = (((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)))
uniques = []
for col in data:
uniques += [unique for unique in list(set(col))]
for x in uniques:
print(x)