Command
df.expandingExplanation
df.expanding() provides cumulative calculations from the start of the Series.
Examples
Cumulative expanding mean
df["col"].expanding().mean()Cumulative sum over time
df["col"].expanding().sum()df.expandingdf.expanding() provides cumulative calculations from the start of the Series.
Cumulative expanding mean
df["col"].expanding().mean()Cumulative sum over time
df["col"].expanding().sum()