-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Not clear which window is default for df.rolling() #17893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
the default is |
that said if you want to clarify the doc-string, would be ok. |
The value |
@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. |
You don't have to explicitly specify it - according to the docs window is an optional keyword argument import pandas as pd
import numpy as np
ser = pd.Series(np.random.randn(10), index=pd.date_range('1/1/2000', periods=10))
print(ser.rolling(window=5, win_type='boxcar').mean())
print(ser.rolling(window=5, win_type=None).mean()) Both of those print statements give the same thing, which means that |
The 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.htmlThe text was updated successfully, but these errors were encountered: