Say I have a Pandas dataframe:
index name A
0 one a
1 two a
2 one b
3 two a
How can I merge rows with identical 'name' so that the new column A is a list of all the A associated with each 'name'? So, the output would be:
index name A
0 one [a, b]
1 two [a]