hot water working nicely

This commit is contained in:
Khalim Conn-Kowlessar 2023-06-15 14:54:24 +01:00
parent aa084a20df
commit 4967ea1e66
2 changed files with 9 additions and 1 deletions

View file

@ -58,7 +58,7 @@ def handler():
df = df.reset_index(drop=True)
import numpy as np
idx = 27
idx = 1
record = df[df.index == idx].to_dict("records")[0]
record = {k: v for k, v in record.items() if v not in [None, np.nan]}
from pprint import pprint

View file

@ -70,6 +70,11 @@ class HotWaterAttributes:
'circulator', # A pump used to circulate hot water in the system
]
# Indicate if the information is assumed
ASSUMED = [
'assumed'
]
def __init__(self, description: str):
self.description: str = clean_description(description.lower())
@ -106,4 +111,7 @@ class HotWaterAttributes:
"no_system_present": find_keyword(self.description, self.NO_SYSTEM_PRESENT_KEYWORDS),
}
assumed_found = find_keyword(self.description, self.ASSUMED)
result["assumed"] = True if assumed_found else False
return result