The title wasn't too clear but here's an example. Suppose I have:
person apple orange type
Alice 11 23 apple
Bob 14 20 orange
and I want to get this column
person new_col
Alice 11
Bob 20
so we get the column 'apple' for row 'Alice' and 'orange' for row 'Bob'.
I'm thinking iterrows, but that would be slow. Are there faster ways to do this?