Rolling Average DF
df['pandas_SMA_3'] = df.iloc[:,1].rolling(window=3).mean()
Hambo
df['pandas_SMA_3'] = df.iloc[:,1].rolling(window=3).mean()
# Calculating the short-window simple moving average
short_rolling = data.rolling(window=20).mean()
short_rolling.head(20)
# Calculating the long-window simple moving average
long_rolling = data.rolling(window=100).mean()
long_rolling.tail()