I'm trying to read a csv in pandas. My file starts like:
Site,Tank ID,Product,Volume,Temperature,Dip Time
aaa,bbb,....
.....
I read it with:
df = pd.DataFrame()
date_col = ['Dip Time']
data = pd.read_csv(atg_path, delimiter=',', skiprows=[1], skipinitialspace=True,
dayfirst=True,
parse_dates=date_col)
Here it skips the first row data. But I need it.
If I use skiprows=[0]
, then I get errors on some columns, e.g. ValueError: 'Dip Time' is not in list
I don't know why? It shouldn't skip any of the data. What is wrong?