I would like to calculate the mean over a time period of a time series in a for-loop, so the plan was to use np.trapz() to calculate the area under the time series,
np.trapz()