import pointblank as pb
spec = pb.MissingSpec(
reasons={".": "system_missing", "._": "system_missing", ".R": "refused"}
)
spec.values_for_reason("system_missing")['.', '._']
Get all sentinel values that correspond to a given reason.
Usage
reason: str listreason, or an empty list if no sentinel value has that reason. Nulls are never included, even when reason is the spec’s null_reason.
import pointblank as pb
spec = pb.MissingSpec(
reasons={".": "system_missing", "._": "system_missing", ".R": "refused"}
)
spec.values_for_reason("system_missing")['.', '._']
Both SAS-style codes for system missing values are returned. This is the reverse of reason_for(), which goes from a value to its reason.