I am trying to parse 6 datetime columns to one withon a .dat-file. I have tried this or this but I remain to get errors. My file looks like this:
YYYY MM DD HH MM SS Julday a b c d
Lat 35...
Lon -120...
Elev 680
2015 10 09 00 00 30 235.34 3 4 2 6
...
I have about 400 rows. I want the 6 datetime columns to be in the usual way like 2013-10-09 00:00:30.
I hve tried this for example:
dat-file = pd.read_csv('C:/.../myfile.dat', header=4, sep='\s+\s', parse_dates=[[0]])
But I get the error message:
ValueError: New date column already in dict 2013 10 20 00 47 30
I am new to python and have not used pandas yet. Probably there is a problem reading a .dat-file with pd.read_csv
? Thanks!