I have a dataframe(df) with the following structure:
Store Item
S1 I1
S1 I2
S1 I3
S1 I4
S2 I1
S2 I2
S2 I3
S3 I1
S3 I2
S3 I3
S4 I5
I was hoping for an approach to get a group/cluster for stores based on the common elements in them, that is the following:
Store Group Common_element_with_group
S1 1 I1,I2,I3,I4
S2 2 I1,I2,I3
S3 2 I1,I2,I3
S4 3 I5
Does anyone know of an method to achieve this, I don't even an approach for this.