Skip to main content

from_cdisc()

Create a MissingSpec for the standard HL7/CDISC null flavors (short alias).

Usage

Source

from_cdisc(**kwargs)

This is a shorter name for from_cdisc_null_flavors(), and it takes the same keyword arguments (null_is_missing=, null_reason=, and description=).

Parameters

**kwargs: Any
Keyword arguments passed on to from_cdisc_null_flavors().

Returns

MissingSpec
A spec with the standard null flavor codes.

Examples

import pointblank as pb

cdisc_missing = pb.MissingSpec.from_cdisc(null_reason="unknown")

cdisc_missing.reason_for(None)
'unknown'

Here nulls get the "unknown" reason rather than the default "no_information", which still places them in the "unknown" category.