I have a pandas dataframe that looks like:
A B
1 a
1 b
1 c
2 d
2 e
2 f
I want to get a list of values for column 'B' by column 'A', so the final product would look like:
list_one = [a, b, c]
list_two = [d, e, f]
I've tried:
df.groupby(['A','B'])
But, this doesn't do what I want it to do.
What would be an elegant pythonic way to achieve this?