Skip to content

Commit b277922

Browse files
authored
Merge pull request #1000 from dshemetov/nancodes_nans
Add nancodes enum util
2 parents 3a97ea4 + f1d05ae commit b277922

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

_delphi_utils_python/delphi_utils/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
from .geomap import GeoMapper
1313
from .smooth import Smoother
1414
from .signal import add_prefix
15+
from .nancodes import Nans
1516

1617
__version__ = "0.1.0"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""Unified not-a-number codes for CMU Delphi codebase."""
2+
3+
from enum import IntEnum
4+
5+
class Nans(IntEnum):
6+
"""An enum of not-a-number codes for the indicators."""
7+
8+
NOT_MISSING = 0
9+
NOT_APPLICABLE = 1
10+
REGION_EXCEPTION = 2
11+
PRIVACY = 3
12+
DELETED = 4
13+
UNKNOWN = 5

0 commit comments

Comments
 (0)