2

I have imported some data but the date column is in this format: 50:58.0, 23:11.0.. etc- when i click on the cell in excel however it is: 02/05/2019 07:50:58 (for the first one 50:54.0). So when i import into python as a pandas table it still retains the 50:54.0 format although i do not know why.

I tried changing the column to datetime as:

df['EventTS'] =  pd.to_datetime(df['EventTS'], format='%d%b%Y:%H:%M:%S.%f') 

but it doesn't work the error is time data '07:27.0' does not match format '%d%b%Y:%H:%M:%S.%f' (match)

without changing format in excel how do i correct this issue in python?

Maths12
  • 852
  • 3
  • 17
  • 31

0 Answers0