Not clear which window is default for df.rolling()
See original GitHub issueThe docstring for df.rolling()
doesn’t say which window is the default (I assume it’s boxcar?): https://pandas-docs.github.io/pandas-docs-travis/generated/pandas.DataFrame.rolling.html
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Left-align a pandas rolling object - python - Stack Overflow
Namely when the window shrinks at the end of the data would cause right alignment shrinking window by default. So you must reverse...
Read more >Don't Miss Out on Rolling Window Functions in Pandas
Rolling Functions in a Pandas DataFrame ; 1. Window Rolling Mean (Moving Average) · df['Rolling Close Average'] = df['Close*'].rolling(2).mean().
Read more >pandas.DataFrame.rolling — pandas 1.5.2 documentation
If 0 or 'index' , roll across the rows. If 1 or 'columns' , roll across the columns. For Series this parameter is...
Read more >How rolling() Function works in Pandas Dataframe? - eduCBA
Pandas rolling() function gives the element of moving window counts. The idea of moving window figuring is most essentially utilized in signal handling...
Read more >Pandas Series: rolling() function - w3resource
The rolling() function is used to provide rolling window calculations. Syntax: Series.rolling(self, window, min_periods=None, center=False, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You don’t have to explicitly specify it - according to the docs window is an optional keyword argument
Both of those print statements give the same thing, which means that
win_type=None
uses a boxcar window, but reading the docs I don’t think there is any way of knowing that.@dstansby it doesn’t, you must explicity specify. it if you want that ‘kind’ of window. Full documentation is: http://pandas.pydata.org/pandas-docs/stable/computation.html#rolling-windows
maybe should link to it.