I am new here, I apologize if the layout is not typical.
I have a large csv with around 150,000 rows. The Date column alternates between two formats, but it always increases in increments of 10 minutes.
First 2001-02-08 2:30:00 AM -- %Y-%m-%d %I:%M:%S %p
Second 01/13/08 00:20:00 -- %y/%d/%m %H:%M:%
I have a bunch of ways, one is to parse as I read_csv and second is to use pd.to_dateime. But I keep getting an erroneous output.
The attached picture is the output from
df1['Test'] = pd.to_datetime(df1['Date'],yearfirst=True)
the year in the output should not be 2008