I just used .groupby and .agg to make my df as follows -
Name inclusionId
A 1 , 2
B 1 , 3
C 5 , 7
D 5 , 2 , 9 , 7 , 1
E 2 , 1 , 9
Now I want to check whether these are subsets of each other or not. Need output like below -
Name inclusionId Subset of -
A 1 , 2 E
B 1 , 3 No
C 5 , 7 D
D 5 , 2 , 9 , 7 , 1 No
E 2 , 1 , 9 D
Please help!