File tree 1 file changed +21
-26
lines changed
spec/API_specification/dataframe_api
1 file changed +21
-26
lines changed Original file line number Diff line number Diff line change 17
17
18
18
class null :
19
19
"""
20
- A `null` singleton object to represent missing data.
20
+ A `null` object to represent missing data.
21
21
22
- ``null`` may be used when constructing a `Column` from a Python sequence.
23
- It supports ``is``, and does not support ``==`` and ``bool``.
22
+ ``null`` is a scalar, and may be used when constructing a `Column` from a
23
+ Python sequence with `column_from_sequence`. It does not support ``is``,
24
+ ``==`` or ``bool``.
24
25
25
- Methods
26
- -------
27
- __bool__
28
- __eq__
26
+ Raises
27
+ ------
28
+ TypeError
29
+ From ``__eq__`` and from ``__bool__``.
30
+
31
+ For ``_eq__``: a missing value must not be compared for equality
32
+ directly. Instead, use `DataFrame.isnull` or `Column.isnull` to check
33
+ for presence of missing values.
34
+
35
+ For ``__bool__``: truthiness of a missing value is ambiguous.
36
+
37
+ Notes
38
+ -----
39
+ Like for Python scalars, the ``null`` object may be duck typed so it can
40
+ reside on (e.g.) a GPU. Hence, the builtin ``is`` keyword should not be
41
+ used to check if an object *is* the ``null`` object.
29
42
30
43
"""
31
- def __eq__ (self ):
32
- """
33
- Raises
34
- ------
35
- RuntimeError
36
- A missing value must not be compared for equality. Use ``is`` to check
37
- if an object *is* this ``null`` object, and `DataFrame.isnull` or
38
- `Column.isnull` to check for presence of missing values.
39
- """
40
- ...
41
-
42
- def __bool__ (self ):
43
- """
44
- Raises
45
- ------
46
- TypeError
47
- Truthiness of a missing value is ambiguous
48
- """
49
- ...
44
+ ...
You can’t perform that action at this time.
0 commit comments