I have list of similar contents, I want to create a cluster list with it in jupyter.
for example this is the list I have:
col_combi = [(‘a’,’b’), (‘b’,’c’), (‘d’,’e’), (‘l’,’j’), (‘c’,’g’),
(‘e’,’m’), (‘m’,’z’), (‘z’,’p’), (‘t’,’k’), (‘k’, ‘n’),
(‘j’,’k’)]
this means, “a” is similar to “b”, “b” is similar to “c” and goes on
The final desired output is:
‘a-b-c-g’,
‘d-e-m-z-p’,
‘l-j-k-n-t’
I tried networkx library but I couldnt hack it
Ömer Faruk Güllüoğlu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1