Python, Pandas, Data Science, Climate Change, Matplotlib.
index=timestamps) def get_cadence(mean_cadence: int) -> pd.Series[float]: noise = np.random.normal(loc=0.0, scale=1, size=100) cadence = pd.Series(data=[mean_cadence] * 100 + noise, index=timestamps) cadence[::3] = np.NAN cadence[1::3] = np.NAN return cadence.ffill().fillna(mean_cadence) The code