I have data recorded automatically every minute. The data looks like this
The plot that I am trying to have should be like this.
I am trying to average each variable such that the final will have 1440 (60X24) time steps. In this way, I will able to plot the diurnal cycle of each variable.
import pandas as pd
import numpy as np
xdata = pd.read_csv("station_2019_2.csv")
xtime = pd.date_range("2019-10-01", "2019-11-01", freq="min")
ydata = xdata.drop(columns=["Date", "Time"])
df = pd.DataFrame(ydata)
df["Date"] = xtime[1:]
df.index = pd.to_datetime(df.index)
mHI = df.resample('1Min')['Hi'].mean()
print(np.shape(mHI))
Unfortunately, is not working. Any help will be appreciated.
regards