-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
BUG: pandas rolling_quantile does not use interpolation #9413
Comments
It looks like the difference here is that
So yes, I think we can consider this a bug.
@leo4183 Thanks for the report! Please raise another issue for |
I have xref #8659 there are a number of related issued w.r.t. rolling functions. Pull requests are welcome! |
This issue still happens with the new rolling() objects (pandas 0.18.0). A workaround is to apply the numpy function, which works for any number in 'row'. On the other hand, median always works: A similar issue may be also happening with the functions std() and var(), which also give different results than the numpy equivalents. |
@queise this issue is still open and the impl has not changed pull requests to fix are welcome |
thank you @jreback for your quick reply. I'll take a look and try my best. |
i recently bumped an unexpected issue with pandas rolling funcs. rolling_quantile for example:
looks like pandas.DataFrame.quantile member func is consistent with the numpy.percentile func. however the pandas.rolling_quantile func returns diff results. reduce the row number to 5, the problem will be gone (all three methods return the same results). any thoughts?
ps: i also tested rolling_std func which will "randomly" generate errors with 10^-7 ~ 10^-8 scales (compared to pandas.DataFrame std member func or numpy/scipy std funcs which could limit the error close to np.spacing(1) level) for long (row-wise) pandas.DataFrames
python environment:
python 3.4.2
cython 0.21.1
numpy 1.8.2
scipy 0.14.0
pandas 0.15.1
statsmodels 0.6.0
The text was updated successfully, but these errors were encountered: