I have below dataframe.
**Col1** **Col2**
ABC S1
ABC S2
BCD S3
FJK S5
XYZ S7
XYZ S8
I need output in the below format.
data = {'ABC': '[S1,S2]', 'BCD': '[S3]', 'FJK': '[S5]', 'XYZ': '[S7,S8]'}
Can anyone please help me how to achieve above output, it will be great !