Try to create a new dataframe with the data for the months where the statistics will be calculated before their calculation. Thus, we can resample directly the time series and avoid to use the function "resample(str(h) + t).agg(pd.Series.sum, min_count=1)" which is slowing down the computation of the statistics.
Try to create a new dataframe with the data for the months where the statistics will be calculated before their calculation. Thus, we can resample directly the time series and avoid to use the function "resample(str(h) + t).agg(pd.Series.sum, min_count=1)" which is slowing down the computation of the statistics.