If we have a input of a dictionary with format {key: [list]} like below
Key1: [value01, value02, value 03]
Key2: [value02, value04, value 05]
Key3: [value01, value03, value 07]
Key4: [value01, value03, value 04]
The values are strings Is there a way where we can group/cluster the keys based on the similarity between it's values(lists) in python?
Consider this as a huge data of 1M Keys and group the keywords with common values of more than 2. Like in the above example, I can group keys into two sets. (Key1, Key3, Key4), (Key2). Is there any way to do that in graph based method, instead of using for loops?
Tried for loops, but it was taking hours to complete for the large data set.