this might be an easy question to answer but somehow I don't get the solution. The problem is, that I have data from three measurement points. Two of them are using the dtype: datetime64[ns, UTC] But the last one uses dtype: datetime64[ns].
I came across many answers but nothing worked for me so far but maybe it's just my issue of not knowing how to work with pandas. So with pandas, I would like to merge the data along with the timestamp. But pandas doesn't let me because of the different timestamps with the following message:
ValueError: You are trying to merge on datetime64[ns, UTC] and datetime64[ns] columns. If you wish to proceed you should use pd.concat
What exactly do I have to type to convert my values correctly? I tried a lot like:
pd.to_datetime(df.time, unit='ns').dt.tz_localize('UTC')
or
pd.to_datetime(df, unit='ns').dt.tz_localize('UTC').dt.tz_convert('US/Eastern')
but nothing was working for me so far... I very much appreciate your help.