The problem is that you might have empty or null values in the column 'TIME' that you want to convert to a datetime.
pd.to_datetime, by default, won't continue to parse the dates and it will raise an error. Several options are available depending on what you need:
- Remove empty values from your dataframe
- Impute the missing values
- If you don't mind having empty dates for the next steps of your data preparation, you can add the option
This will ignore the error when parsing null values, and it will set those as NaT
Hope this helps!