MCPcopy Create free account
hub / github.com/apache/arrow / describe_null

Method describe_null

python/pyarrow/interchange/column.py:364–379  ·  view source on GitHub ↗

Return the missing value (or "null") representation the column dtype uses, as a tuple ``(kind, value)``. Value : if kind is "sentinel value", the actual value. If kind is a bit mask or a byte mask, the value (0 or 1) indicating a missing value. None otherwis

(self)

Source from the content-addressed store, hash-verified

362
363 @property
364 def describe_null(self) -> Tuple[ColumnNullType, Any]:
365 """
366 Return the missing value (or "null") representation the column dtype
367 uses, as a tuple ``(kind, value)``.
368
369 Value : if kind is "sentinel value", the actual value. If kind is a bit
370 mask or a byte mask, the value (0 or 1) indicating a missing value.
371 None otherwise.
372 """
373 # In case of no missing values, we need to set ColumnNullType to
374 # non nullable as in the current __dataframe__ protocol bit/byte masks
375 # cannot be None
376 if self.null_count == 0:
377 return ColumnNullType.NON_NULLABLE, None
378 else:
379 return ColumnNullType.USE_BITMASK, 0
380
381 @property
382 def null_count(self) -> int:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected