UPDATE
I think that starting from version 0.16.1 , now an error will occur if you try to pass True to index_col to avoid this ambiguity
ORIGINAL
Many people are embarrassed by this to indicate the ordinal index of your column, you have to pass the position of int in this case 0 .
In [3]: import io import pandas as pd t="""index,a,b 0,hello,pandas""" pd.read_csv(io.StringIO(t)) Out[3]: index ab 0 0 hello pandas
The default value is index_col=None as shown above.
If we set index_col=0 we explicitly declare that the first column should be considered as an index:
In [4]: pd.read_csv(io.StringIO(t), index_col=0) Out[4]: ab index 0 hello pandas
If we pass index_col=False we get the same result as None :
In [5]: pd.read_csv(io.StringIO(t), index_col=False) Out[5]: index ab 0 0 hello pandas
If we now index_col=None we get the same behavior as when we did not pass this parameter:
In [6]: pd.read_csv(io.StringIO(t), index_col=None) Out[6]: index ab 0 0 hello pandas
There is an error in which if you pass True it was erroneously converted to index_col=1 since True was converted to 1 :
In [6]: pd.read_csv(io.StringIO(t), index_col=True) Out[6]: index b a 0 hello pandas
EDIT
For the case when you have an empty index column that you have:
In [7]: import io import pandas as pd t=""",a,b 0,hello,pandas""" pd.read_csv(io.StringIO(t)) Out[7]: Unnamed: 0 ab 0 0 hello pandas In [8]: pd.read_csv(io.StringIO(t), index_col=0) Out[8]: ab 0 hello pandas In [9]: pd.read_csv(io.StringIO(t), index_col=False) Out[9]: Unnamed: 0 ab 0 0 hello pandas In [10]: pd.read_csv(io.StringIO(t), index_col=None) Out[10]: Unnamed: 0 ab 0 0 hello pandas