Skip to content

Commit

Permalink
Add null null key val
Browse files Browse the repository at this point in the history
  • Loading branch information
wagnerlmichael committed Jul 31, 2024
1 parent 43b31c4 commit d529049
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
RUN_ID_FIELD = "USER28"

OUTLIER_TYPE_CODES = {
None: None,
"Low price": "1",
"High price": "2",
"Low price per square foot": "3",
Expand Down Expand Up @@ -112,6 +113,8 @@
for field in not_null_fields:
assert flag_df[flag_df[field].isnull()].empty, f"{field} contains nulls"

logger.info(f"Got {num_flags} sales with flags")

for field in [OUTLIER_REASON1_FIELD, OUTLIER_REASON2_FIELD, OUTLIER_REASON3_FIELD]:
invalid_values = flag_df[~flag_df[field].isin(OUTLIER_TYPE_CODES.values())]
assert invalid_values.empty, f"{field} contains invalid codes"
Expand Down

0 comments on commit d529049

Please sign in to comment.