module ‘pandas’ has no attribute ‘rolling_mean’

I believe need change:

moving_avg = pd.rolling_mean(ts_log,12)

to:

moving_avg = ts_log.rolling(12).mean()

because old pandas version code below pandas 0.18.0

Leave a Comment