So I am trying to convert 2 columns into 1 datetime column. Input columns look like this:
date hour
1/1/2015 1
1/1/2015 2
1/1/2015 3
where the values of df.date is a string and the values of df.hour is an int. I am trying to convert these two columns into one such that:
datetime
2015-1-1 1:00:00
2015-1-1 2:00:00
2015-1-1 3:00:00
I thought a simple df['x'] = pd.to_datetime(df[['date', 'hour']] would work but I'm getting a ValueError as a result