Skip to content

DOC: No example for on kwarg of DataFrame.rolling() #50080

Closed
@janosh

Description

@janosh

Pandas version checks

  • 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.

Metadata

Metadata

Assignees

Labels

DocsWindowrolling, ewma, expanding

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions