-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
ds.notnull() fails with AttributeError on pandas 0.21.0rc1 #1663
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Just confirmed this is caused by a change in pandas somewhere between 0.20.3 and 0.21.0rc1. I don't know if that is a bug in pandas, or a deliberate change that xarray will somehow need to handle, in particular after 0.21.0 final is released. |
The offending commit is pandas-dev/pandas@7930202 |
What I still don't know: is this a bug in |
I think we'd need to change |
@gerritholl : Weird that that commit would have caused things to break, since the changes should have been backwards-compatible (all we did was alias). |
I'm not sure if I understand correctly, but it appears xarray has a hardcoded list of names of pandas functions/methods that need to be treated in a particular way. I might be on the wrong track though. |
In pandas commit pandas-dev/pandas@7930202 isna and notna were added as aliases for isnull and notnull. Those need to be added to PANDAS_UNARY_FUNCTIONS for xarray datasets notnull to work. Closes pydata#1663.
We actually dealt with this back in #1549, but need to get a new xarray release out promptly so users can upgrade pandas. |
Oh, I missed that. I should have tried with xarray master. |
xarray.Dataset({"A": ("x", arange(5))}).notnull()
fails with an 'AttributeError' when usingnumpy
1.13.3,xarray
0.9.6, andpandas
0.21.0rc1. TheAttributeError
is raised bypandas
; see below.The text was updated successfully, but these errors were encountered: