I have an Excel file and there are two columns in it, I want to combine them, but one of them is in datetime form and the other is object (actually time). What I want to do is convert the object one to datetime format.enter image description here
I've tried everything I can think of but I keep getting an error. Edit :enter image description here
import pandas as pd dataFrame = pd.read_excel('/content/drive/MyDrive/Colab Notebooks/data.xlsx') dataFrame.head() output: enter image description here and my error enter image description here
If I'm understanding? You'd want to split "Time" column on space and take 0 index. Finally use .cat to concatenate the string columns together. Next .pop old columns and finally wrap it all in to_datetime.