I have a DataFrame that looks like this:
A B C
1 2 3
1 5 3
4 8 2
4 2 1
I would like to create a NumPy array from this data using column A as the index, column B as the column headers and column C as the fill data.
Ultimately, it should look like this:
2 5 8
1 3 3
4 1 2
Is there a good way to do this?
I have tried df.pivot_table, but I'm worried I have messed up the data, and I would rather do it in another, more intuitive way.


0sorNaNsor something else?