October 2019
Beginner to intermediate
674 pages
16h 43m
English
If a file has one more column of data than the number of column names, the first column will be used as the DataFrame's row names:
data = 'a,b,c\n4,apple,bat,5.7\n8,orange,cow,10'pd.read_csv(StringIO(data), index_col=0)
We get the following output:

Read now
Unlock full access