a = np.array([[5, 6, 7, 8],[5, 6, 7, 8]])
df = pd.DataFrame(a, columns=['a'])
ValueError: Shape of passed values is (2, 4), indices imply (2, 1)
I hope that the final result is:
a
-----------
[5, 6, 7, 8]
[5, 6, 7, 8]
Edit:
df = pd.DataFrame({"a": [a]})
a
----------------------------------
0 [[5, 6, 7, 8], [5, 6, 7, 8]]
why?