'ParserError: Error tokenizing data. C error: Expected 9 fields in line 23, saw 10

i am trying to read data from IAM database with this line

data = pd.read_csv('words.csv' ,sep=' ',header=None)

but i got this error

ParserError: Error tokenizing data. C error: Expected 9 fields in line 23, saw 10

Because in line 23 of the last column, I have a string "M Ps" with a space and it is handled as separate columns. Click to see the line

Any solutions?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source