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 @@ -77,33 +77,28 @@ def dataframe_from_dict(data: Mapping[str, Column]) -> DataFrame:
77
77
78
78
class null :
79
79
"""
80
- A `null` singleton object to represent missing data.
80
+ A `null` object to represent missing data.
81
81
82
- ``null`` may be used when constructing a `Column` from a Python sequence.
83
- It supports ``is``, and does not support ``==`` and ``bool``.
82
+ ``null`` is a scalar, and may be used when constructing a `Column` from a
83
+ Python sequence with `column_from_sequence`. It does not support ``is``,
84
+ ``==`` or ``bool``.
84
85
85
- Methods
86
- -------
87
- __bool__
88
- __eq__
86
+ Raises
87
+ ------
88
+ TypeError
89
+ From ``__eq__`` and from ``__bool__``.
90
+
91
+ For ``_eq__``: a missing value must not be compared for equality
92
+ directly. Instead, use `DataFrame.isnull` or `Column.isnull` to check
93
+ for presence of missing values.
94
+
95
+ For ``__bool__``: truthiness of a missing value is ambiguous.
96
+
97
+ Notes
98
+ -----
99
+ Like for Python scalars, the ``null`` object may be duck typed so it can
100
+ reside on (e.g.) a GPU. Hence, the builtin ``is`` keyword should not be
101
+ used to check if an object *is* the ``null`` object.
89
102
90
103
"""
91
- def __eq__ (self ):
92
- """
93
- Raises
94
- ------
95
- RuntimeError
96
- A missing value must not be compared for equality. Use ``is`` to check
97
- if an object *is* this ``null`` object, and `DataFrame.isnull` or
98
- `Column.isnull` to check for presence of missing values.
99
- """
100
- ...
101
-
102
- def __bool__ (self ):
103
- """
104
- Raises
105
- ------
106
- TypeError
107
- Truthiness of a missing value is ambiguous
108
- """
109
- ...
104
+ ...
You can’t perform that action at this time.
0 commit comments