-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
[0.19dev] Time-series aware rolling window with MultiIndex with a time-frequency index fails #14259
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
pls make sure that the code you are showing is from the version where you are running. you might have from another session. IOW, you are picking up a different version from which you are showing
|
@jreback I'm indeed running this in the version I quoted above. This was run in a fresh virtual environment created just for this. However, I did forget to write Please try again with this snippet: dft = pd.DataFrame({'B': [0, 1, 2, np.nan, 4]},
index=pd.date_range('20130101 09:00:00', periods=5, freq='s'))
dft['another'] = ['a', 'a', 'c', 'd', 'e']
dft.set_index([dft.index, 'another'], inplace=True)
dft.rolling('2s') |
of course that doesn't work, you have a multi-index.
|
@jreback thanks for your reply. The docs aren't at all clear that time-series support for rolling applies only if you have a single index. |
well the doc-string is pretty clear. as I said you can put forth an issue for an enhancement. |
Code Sample, a copy-pastable example if possible
Expected Output
Expected to be able to use a time-series aware rolling window, instead got
ValueError: window must be an integer
output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: