Closed saalUW closed 1 month ago
This could be a solution:
import pandas as pd
data = {"lists": [[1, 2, 3], [7, 43], [1, 2, 1], [10, 11, 12], [8, 8]]}
df = pd.DataFrame(data)
def is_unique(lst): return len(lst) == len(set(lst))
df["is_unique"] = df["lists"].apply(is_unique)
non_unique_rows = df[df["is_unique"] == False]
print(non_unique_rows)
When parsing data, check if cat_group elements are unique