Skip to content

Add nancodes enum util #1000

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _delphi_utils_python/delphi_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
from .geomap import GeoMapper
from .smooth import Smoother
from .signal import add_prefix
from .nancodes import Nans

__version__ = "0.1.0"
13 changes: 13 additions & 0 deletions _delphi_utils_python/delphi_utils/nancodes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""Unified not-a-number codes for CMU Delphi codebase."""

from enum import IntEnum

class Nans(IntEnum):
"""An enum of not-a-number codes for the indicators."""

NOT_MISSING = 0
NOT_APPLICABLE = 1
REGION_EXCEPTION = 2
PRIVACY = 3
DELETED = 4
UNKNOWN = 5