-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Can't figure out how to get exponential working #34593
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
I finally fixed this by changing the code as follows: import pandas as pd
to_test = pd.DataFrame({ "data": [1,2,3,4,5,6,7,8,9,10] })
exponent = to_test.rolling(3, win_type="exponential").mean(tau=5)
print(exponent)
Sorry I marked this as a bug, I just figured it out. Perhaps this could be documented somewhere? I can't find any other reference online about this. |
Thanks @tavurth for the report
Here it is https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.Series.rolling.html Though to be fair, perhaps |
How about |
Yes, I think that would be clearer - would you like to submit a pull request, @wchen928 ? If so, perhaps reword the others where this happens too (e.g. |
Sounds good. I will do that. |
DOC: Clarify where to the additional arguments for some win_types For example, std needs to specify when win_types is gaussian. However, std should be specified in the operation argument, not as one of the rolling arguments. This change is to clarify this point. Closes: pandas-dev#34593
DOC: Clarify where to the additional arguments for some win_types For example, std needs to specify when win_types is gaussian. However, std should be specified in the operation argument, not as one of the rolling arguments. This change is to clarify this point. Closes: pandas-dev#34593
I hope I did it right. I am not sure what the 5 tasks are. Do I need to check them off? or the reviewer will check them off? Sorry about the entry-level question... this is my first commit. |
You did, for documentation fixes like this most of those boxes don't really apply (and actually checking them off isn't a big deal, more important is the content of the changes) |
Thank you so much for the explanation! |
…4615) * DOC: Clarify some syntax when using win_types DOC: Clarify where to the additional arguments for some win_types For example, std needs to specify when win_types is gaussian. However, std should be specified in the operation argument, not as one of the rolling arguments. This change is to clarify this point. Closes: #34593 * DOC: Clarify where to the additional arguments for some win_types Edit: 711add5 First Commit Original issue: #34615 * DOC: Clarify where to the additional arguments for some win_types Edit: a3e38ac Second Commit What's new: I shortened line 935 so that each line is less than 88 characters. Original Issue: #34615 * Revert "DOC: Clarify where to the additional arguments for some win_types" This reverts commit 45be538. * Revert "Revert "DOC: Clarify where to the additional arguments for some win_types"" This reverts commit 05ed0eb. * DOC: Remove whitespace in docstring * DOC: Remove indent of line934 * Update pandas/core/window/rolling.py Co-authored-by: Tom Augspurger <[email protected]>
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
I can't get exponential rolling working, and there's no documentation on this.
Expected Output
The exponential mean of the first 4 values
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : None
python : 3.7.7.final.0
python-bits : 64
OS : Darwin
OS-release : 19.3.0
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : en_GB.UTF-8
LOCALE : en_GB.UTF-8
pandas : 1.0.4
numpy : 1.18.5
pytz : 2020.1
dateutil : 2.8.1
pip : 20.1.1
setuptools : 46.0.0
Cython : 0.29.17
pytest : 5.4.2
hypothesis : None
sphinx : None
blosc : None
feather : 0.4.1
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.14.0
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : 3.2.1
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 0.17.0
pytables : None
pytest : 5.4.2
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : None
tables : None
tabulate : 0.8.7
xarray : None
xlrd : None
xlwt : None
xlsxwriter : None
numba : None
The text was updated successfully, but these errors were encountered: