A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/7618 below:

rolling_window yields unexpected results with win_type='triang' · Issue #7618 · pandas-dev/pandas · GitHub

Here's the example in the documentation, modified to have non-zero mean:

n = 100
ser = pandas.Series(randn(n)+10, index=pandas.date_range('1/1/2000', periods=n))
pandas.rolling_window(ser, 5, 'triang').plot()
pandas.rolling_window(ser, 5, 'boxcar').plot()

The rolling boxcar window is centered around 10, as expected.

The triang window is centered around 6. That suggests that the weights in the window don't add up to 1.

Either that or my expectation of how it should work is wrong?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4