My CSV file has on the first 2 rows the names that I would like to use as column names and the first two columns as row names. So, the file looks like this:
tp,desc,L,L,D,D
,,1,2,3,4
3001, foo, 23.1, 35.3, 52.0, 11.9
3010, bar, 31.l, 25.9, 13.9, 134.8
I was able to set the first two columns as an index, but am stuck on getting the first two rows be accepted as column names
This is my input statement so far:
df = pd.read_csv("file.csv", index_col=[tp,desc])
Thanks.