I have a DataFrame using pandas:
one two three
1 2 1
4 1 1
2 2 1
3 1 2
20 2 2
Now, I would extract the a vector by grouping 'three'. Basically, I should obtain vectors from the 'two' column based on grouping "three":
groupby('three')
a=[2,1,2]
b=[1,2]
thanks a lot