python pandas not reading first column from csv file

Judging by your data it looks like the delimiter you’re using is a .

Try the following:

a = pandas.DataFrame.from_csv('st1.csv', sep=' ')

The other issue is that it’s assuming your first column is an index, which we can also disable:

a = pandas.DataFrame.from_csv('st1.csv', index_col=None)

UPDATE:

In newer pandas versions, do:

a = pandas.DataFrame.from_csv('st1.csv', index_col=False)

Leave a Comment