mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
debuggin
This commit is contained in:
parent
d00c291c17
commit
05cf751478
1 changed files with 23 additions and 9 deletions
|
|
@ -1777,8 +1777,9 @@ def propsed_wave_3_sample():
|
|||
"2 - same archetype", region_assets["Confidence Tier"]
|
||||
)
|
||||
|
||||
region_assets["Current EPC Band"] = region_assets["Current EPC Band"].fillna(
|
||||
region_assets["Current EPC Band_method2"].astype(str),
|
||||
region_assets["Current EPC Band"] = np.where(
|
||||
pd.isnull(region_assets["Current EPC Band"]) & pd.notnull(region_assets["Current EPC Band_method2"]),
|
||||
region_assets["Current EPC Band_method2"], region_assets["Current EPC Band"]
|
||||
)
|
||||
|
||||
region_assets = region_assets.drop(columns=["Current EPC Band_method2"])
|
||||
|
|
@ -1822,12 +1823,26 @@ def propsed_wave_3_sample():
|
|||
final_missed_matches.append(
|
||||
{
|
||||
"Address ID": a_id,
|
||||
"Confidence Tier": "5 - no similar property, needs survey to confirm"
|
||||
"Confidence Tier": "5 - no similar property, needs survey to confirm",
|
||||
"Current EPC Band": "Unknown"
|
||||
}
|
||||
)
|
||||
continue
|
||||
# We take an average
|
||||
expected_sap = surveyed_similar["Current SAP Rating"].mean()
|
||||
expected_epc = sap_to_epc(expected_sap)
|
||||
if expected_epc in ["C", "B", "A"]:
|
||||
tier = "6 - EPC C or above"
|
||||
else:
|
||||
tier = "3 - similar property"
|
||||
|
||||
raise NotImplementedError("Implement me")
|
||||
final_missed_matches.append(
|
||||
{
|
||||
"Address ID": a_id,
|
||||
"Confidence Tier": tier,
|
||||
"Current EPC Band": "Unknown"
|
||||
}
|
||||
)
|
||||
|
||||
final_missed_matches = pd.DataFrame(final_missed_matches)
|
||||
|
||||
|
|
@ -1841,14 +1856,13 @@ def propsed_wave_3_sample():
|
|||
region_assets["Confidence Tier"] = region_assets["Confidence Tier"].fillna(
|
||||
region_assets["Confidence Tier_method3"]
|
||||
)
|
||||
region_assets["Current EPC Band"] = np.where(
|
||||
pd.isnull(region_assets["Current EPC Band"]),
|
||||
region_assets["Current EPC Band_method3"], region_assets["Current EPC Band"]
|
||||
)
|
||||
|
||||
region_assets = region_assets.drop(columns=["Confidence Tier_method3"])
|
||||
|
||||
region_assets["Current EPC Band"] = np.where(
|
||||
region_assets["Confidence Tier"] == "5 - no similar property, needs survey to confirm",
|
||||
"Unknown", region_assets["Current EPC Band"]
|
||||
)
|
||||
|
||||
if pd.isnull(region_assets["Current EPC Band"]).sum():
|
||||
raise Exception("Something went wrong")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue