There are the following data:
board_href_deals items test1
0 test2 {'x': 'a'} test1
1 test2 {'x': 'b'} test2
After grouping "board_href_deals", I would like to output the existing data in a list format as follows:
board_href_deals items test1
0 test2 [{'x': 'a'}, {'x': 'b'}] ['test1', 'test2']
thank you
df.groupby('board_href_deals').agg(list)?