8000 Return encoding for missing values · iskode/dataframe-api@9b9aecf · GitHub
[go: up one dir, main page]

Skip to content

Commit 9b9aecf

Browse files
committed
Return encoding for missing values
1 parent ed64fb7 commit 9b9aecf

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

protocol/dataframe_protocol.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,9 @@ def describe_null(self) -> Tuple[int, Any]:
273273
- 3 : bit mask
274274< 8000 code class="diff-text syntax-highlighted-line">
- 4 : byte mask
275275
276-
Value : if kind is "sentinel value", the actual value. None otherwise.
276+
Value : if kind is "sentinel value", the actual value. If kind is a bit
277+
mask or byte mask, the value (0 or 1) indicating a missing value. None
278+
otherwise.
277279
"""
278280
pass
279281

protocol/pandas_implementation.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,9 @@ def describe_null(self) -> Tuple[int, Any]:
448448
- 3 : bit mask
449449
- 4 : byte mask
450450
451-
Value : if kind is "sentinel value", the actual value. None otherwise.
451+
Value : if kind is "sentinel value", the actual value. If kind is a bit
452+
mask or byte mask, the value (0 or 1) indicating a missing value. None
453+
otherwise.
452454
"""
453455
_k = _DtypeKind
454456
kind = self.dtype[0]
@@ -468,6 +470,7 @@ def describe_null(self) -> Tuple[int, Any]:
468470
value = -1
469471
elif kind == _k.STRING:
470472
null = 4
473+
value = 0
471474
else:
472475
raise NotImplementedError(f"Data type {self.dtype} not yet supported")
473476

0 commit comments

Comments
 (0)
0