I got the variable 'v' which is a 2d array:
in = v
out =
array([[ 217.1, 252.5],
[ 73. , 53. ],
[ 83. , 827. ],
...,
[ 129. , 1214. ],
[ 118.6, 908.2],
[ 90. , 99.5]])
I have a dataframe with multiple columns and now I want to add this array to it in 2 seperate columns. So:
x y
271.1 252.5
and so on.
How can I do this?
I tried:
df["Q_pred"],df["r_pred"] = v
but this gives the error:
ValueError: too many values to unpack (expected 2)
I honestly don't know how to do it.
[and]3. add.T. So now here comes my question:) Why is the most verbose one the accepted answer?