Skip to content

Commit

Permalink
Added new names for pandas isna/notna unary functions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gerritholl committed Oct 27, 2017
1 parent 120e039 commit a5f6576
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xarray/core/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
# wrapped in an Variable/DataArray
NUMPY_UNARY_METHODS = ['astype', 'argsort', 'clip', 'conj', 'conjugate']
PANDAS_UNARY_FUNCTIONS = ['isnull', 'notnull']
if pd.__version__ >= "0.21":
PANDAS_UNARY_FUNCTIONS.extend(['isna', 'notna'])
# methods which remove an axis
REDUCE_METHODS = ['all', 'any']
NAN_REDUCE_METHODS = ['argmax', 'argmin', 'max', 'min', 'mean', 'prod', 'sum',
Expand Down

0 comments on commit a5f6576

Please sign in to comment.