Command
df.rollingExplanation
df.rolling() provides rolling window operations like moving averages.
Examples
3-period moving average
df["col"].rolling(3).mean()5-period rolling sum
df["col"].rolling(5).sum()df.rollingdf.rolling() provides rolling window operations like moving averages.
3-period moving average
df["col"].rolling(3).mean()5-period rolling sum
df["col"].rolling(5).sum()