Lets say I have a dataframe like this:
first|second|
1 a | 123|
2 b | 234|
3 a | 23|
4 b | 1|
5 c | 53|
6 a | 32|
and I'd like to have a dict like this: dict = {'a': [123, 23, 32], 'b':[234, 1], 'c':[53]}
I have thought to use groupby but couldn't figure out how. I know it should be a for loop somehow: add every element from the first column as keys add every element from the second column to the keys they match.