I have the following DataFrame
Codice Sem CFU Rating Gruppo
0 51132 1 10 0.0 [STAT]
1 51197 1 5 0.0 [ING]
2 52354 1 5 0.0 [ING]
3 52496 1 10 0.0 [MST]
4 52498 2 10 0.0 [MST]
... ... ... ... ... ...
57 97667 1 8 3.0 [MTM]
58 97673 2 8 0.0 [MTM]
59 97683 2 5 5.0 [STAT, ING]
60 97690 2 12 0.0 [MST]
61 97725 2 10 0.0 [CSCL, MTM]
As you see, the Gruppo column is made of lists of a finite number of unique elements. I'm trying to generate from this a DF to be used in pulp for something like "if Codice belongs to Gruppo", thus I need a DF (or matrix, but I wanted to indexise using Codice and not just an ordinary integer) made like this:
Codice STAT ING ... MST
0 51132 True False ... False
1 51197 False True ... False
Basically True/False whether the corresponding list contains ING,STAT,MST,...