I am sure there's a cool python/numpy/pandas way to do this.

I am receiving one data point at a time. I would like to compute something like a moving average over the last n observations, even better with exponential smoothing.

I could have a circular buffer where I drop the oldest observation, add the newest, and compute the smoothing on that. I'm looking for a more elegant approach.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.