-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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: AttributeError
when rolling.agg
use np.prod
to calculate rolling product
#54203
Comments
Take |
Just as in #53425, we should not be attempting to replace NumPy functions with pandas methods. |
Sorry for being slow here; back from Vacation |
@mcgeestocks - no problem; are you still interested in working on this? I'd like to get this in for 2.2 as we'd like to enforce the deprecation in 3.0. |
I am but other commitments have had me tied up. What's your deadline? happy to drop so that it can get in for the timeline. |
We're planning to release 2.2 in December. If this hasn't seen any action by November I plan to start working on it. |
Should have my life together by then! I'll un-assign if things change. |
@mcgeestocks - With the 2.2 RC being cut in a few weeks, I'm going to take this up. |
Actually, it appears there is nothing to do here. I get:
While we could fix this for 2.2 directly since it raises today, it will automatically be fixed in 3.0. |
I'm going to keep this issue open until we verify it's fixed in 3.0. |
Sounds good apologies for sleeping on this @rhshadrach. |
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
Try to use
np.prod
inrolling.agg
to calcualte rolling product, but get error message:Expected Behavior
use a function to wrap
np.prod
is fine.Installed Versions
INSTALLED VERSIONS
commit : 0f43794
python : 3.11.0.final.0
python-bits : 64
OS : Darwin
OS-release : 22.5.0
Version : Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000
machine : arm64
processor : arm
byteorder : little
LC_ALL : en_US.UTF-8
LANG : zh_CN.UTF-8
LOCALE : en_US.UTF-8
pandas : 2.0.3
numpy : 1.25.1
pytz : 2023.3
dateutil : 2.8.2
setuptools : 67.8.0
pip : 23.2
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.9.2
html5lib : None
pymysql : 1.0.3
psycopg2 : None
jinja2 : 3.1.2
IPython : 8.14.0
pandas_datareader: 0.10.0
bs4 : 4.12.2
bottleneck : None
brotli : 1.0.9
fastparquet : None
fsspec : 2023.1.0
gcsfs : None
matplotlib : 3.7.2
numba : None
numexpr : 2.8.4
odfpy : None
openpyxl : 3.1.2
pandas_gbq : None
pyarrow : 12.0.1
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.11.1
snappy : None
sqlalchemy : 1.4.41
tables : None
tabulate : 0.9.0
xarray : None
xlrd : None
zstandard : None
tzdata : 2023.3
qtpy : None
pyqt5 : None
The text was updated successfully, but these errors were encountered: