-
-
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
Odd error message, concerning numpy using an alias versus numpy package name #28665
Comments
I'm also running into this warning. It's actually even simpler to reproduce: import pandas as pd
import numpy as np
np.ptp(pd.Series([1, 2, 3])) This will raise the warning. The reason, I think, is ironic: |
We faced a similar issue with argmin / argmax: https://github.com/pandas-dev/pandas/pull/16955/files The recommendation is to have people do |
I would like to take up this issue but as I am new would need some support |
…dev#6581 requested changes made
…andas-dev#6581 requested changes made" This reverts commit d89d7f6.
take |
closed by #30458. |
This produces a poor warning
because
np.ptp
callsSeries.ptp
, which is deprecated. We should instruct the userto convert the Series to an array before calling
ptp
.The warning is defined at
pandas/pandas/core/generic.py
Lines 10197 to 10199 in 20e4c18
In this case I am using numpy ptp, however the error messages states I am not
NO warning
>>> dfagg = df.groupby(['idf']).agg({ 'f1' : [np.min, np.max, numpy.ptp] })
The text was updated successfully, but these errors were encountered: