I do have a dataframe to calculate daily means of a measurement quantity.
index_date = pd.Index(t, name = 'dates') # t is an array of datetime objects
df = pd.DataFrame(gas, index_date, columns=['A'], dtype=float)
daily_mean = df.resample('D', how='mean')
In order to be able plot the data I reset the index and create numpy arrays
daily_mean.reset_index(inplace=True)
date = np.array(daily_mean['dates'])
means = np.array(daily_mean['A'])
My question or problem now is: The timing is not correct. For example the datetime object datetime.datetime(1979, 8, 27, 10, 0) which is the first object in t transforms to '1979-08-27T01:00:00.0000+0100' in the np.array date. Why does this happen and how to I get the correct time?
Thanks in advance for any ideas or helpful comments.