statsmodels.sandbox.tsa.movstat.
movmean
moving window mean
ndarray
time series data
int
window size
or
location of window relative to current position
moving mean, with same shape as x
Notes
for leading and lagging the data array x is extended by the closest value of the array