Skip to content

Commit 041cb7d

Browse files
committed
Support notnull/not na. Closes #9.
1 parent d27cc13 commit 041cb7d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pandas_selectable/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,14 @@ def isna(self):
177177
def isnull(self):
178178
return self._parent.loc[self._parent.index.isnull()]
179179

180+
@doc(pd.Index.notnull)
181+
def notnull(self):
182+
return self._parent.loc[self._parent.index.notnull()]
183+
184+
@doc(pd.Index.notna)
185+
def notna(self):
186+
return self._parent.loc[self._parent.index.notna()]
187+
180188
@doc(pd.Index.isin)
181189
def isin(self, values, levels=None):
182190
idx = self._parent.index.isin(values, levels)
@@ -196,6 +204,8 @@ class SelectableColumn:
196204
__ge__ = selector_wrapper(pd.Series, "__ge__")
197205
isna = selector_wrapper(pd.Series, "isna")
198206
isnull = selector_wrapper(pd.Series, "isnull")
207+
notna = selector_wrapper(pd.Series, "notna")
208+
notnull = selector_wrapper(pd.Series, "notnull")
199209
isin = selector_wrapper(pd.Series, "isin")
200210

201211
def __init__(self, parent, series=None):

0 commit comments

Comments
 (0)