change:

moving_avg = pd.rolling_mean(ts_log,12)

to:

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