Grouping pairs - suggested tools

Astley Le Jasper astley.lejasper at
Mon Sep 20 23:42:26 CEST 2010

I have a list of tuples that indicate a relationship, ie a is related
to b, b is related to c etc etc. What I want to do is cluster these
relationships into groups.  An item will only be associated with a
single cluster.

Before I started, I wondered if there was any particular tool within
Python I should be looking at. I don't expect anyone to code this for
me, just say ... "you need to look at using x". I was going to use
populate a dictionary and

Sorry for being so vague.

Example Data:

Output (grouping id, item ref)

More information about the Python-list mailing list