Skip to content

Commit 55d53b6

Browse files
committed
Add a free isnull function to the top-level namespace
1 parent 3489e31 commit 55d53b6

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

spec/API_specification/dataframe_api/__init__.py

+18-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
from __future__ import annotations
55

6-
from typing import Mapping, Sequence
6+
from typing import Mapping, Sequence, Any
77

88
from .column_object import *
99
from .dataframe_object import *
@@ -102,3 +102,20 @@ class null:
102102
103103
"""
104104
...
105+
106+
def isnull(value: Any, /) -> bool:
107+
"""
108+
Check if an object is a `null` scalar.
109+
110+
Parameters
111+
----------
112+
value : Any
113+
Any input type is valid.
114+
115+
Returns
116+
-------
117+
bool
118+
True if the input is a `null` object from the same library which
119+
implements the dataframe API standard, False otherwise.
120+
121+
"""

spec/API_specification/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ of objects and functions in the top-level namespace. The latter are:
1414
:nosignatures:
1515

1616
__dataframe_api_version__
17+
isnull
1718
null
1819

1920
The ``DataFrame``, ``Column`` and ``GroupBy`` objects have the following

0 commit comments

Comments
 (0)