I have a csv file:
a,b,c
1,2,3
4,5,6
7
as you can see the last row doesn't match with count of headers. So I want to raise an {ValueError}Shape of passed values is (3, 1), indices imply (3, 3)
error when I read the file with pd.read_csv()
function
But if I do it in this way:
pd.DataFrame(np.array([[1, 2, 3], [4, 5, 6], [7]]), columns=['a', 'b', 'c'])
I get this error.
Any thoughts? Thanks in advance!