Pandas version checks

  • [X] I have checked that the issue still exists on the latest versions of the docs on main here

Location of the documentation

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.rolling.html

Documentation problem

There are 11 examples for DataFrame.rolling() but none show or explain the effect of setting on to a column name.

Suggested fix for documentation

Add on example. Sth like

df = pd.util.testing.makeDataFrame()

df.rolling(window=4, on='A').mean()

gives the same output as df.rolling(window=4).mean() which is why I'm unclear what effect on should have.

Comment From: luke396

take