I'm trying to merge two datasets through a datetime field. I'm having trouble getting them in the same format.
First dataset has 2 fields, date and hour. Hour needs to be converted from Pacific time to UTC. Date needs to be converted from DDMMYYYY to YYYYMMDD. Then I'd like to merge them into a datetime field. I've grabbed them through an API that writes to a Pandas dataframe.
Second dataset is a csv and has everything I need to merge in one UTC datetime field as a string.
This is my first time using Pandas, and it looks to me like strptime and similar functions are not designed to be used with a Pandas dataframe. Am I correct in thinking this? Please explain to me like I only have a few months experience programming (because this is true).
So far, the following code seems to work on the first dataset, but it doesn't have the correct hour input for matching to UTC.
pd.to_datetime(results_df['date'] + " " + results_df['hour'], infer_datetime_format=True)