mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
fixing assignment of package ref
This commit is contained in:
parent
1645f9ab9e
commit
9057b3d4da
1 changed files with 10 additions and 2 deletions
|
|
@ -2126,8 +2126,16 @@ def propsed_wave_3_sample():
|
|||
)
|
||||
expected_epc = sap_to_epc(expected_sap)
|
||||
|
||||
archetype_data = archetype_data.sort_values("distance_meters", ascending=True)
|
||||
|
||||
# We take the features of the closest matching property
|
||||
closest_match = archetype_data.sort_values("distance_meters", ascending=True).iloc[0]
|
||||
closest_match = archetype_data.iloc[0]
|
||||
|
||||
# Set the package ref
|
||||
if expected_epc in ["C", "B", "A"]:
|
||||
package_ref = None
|
||||
else:
|
||||
package_ref = archetype_data["Package Ref"].dropna().values[0]
|
||||
|
||||
region_surveyed.append(
|
||||
{
|
||||
|
|
@ -2141,7 +2149,7 @@ def propsed_wave_3_sample():
|
|||
'Survey: Primary Heating System': closest_match["Survey: Primary Heating System"],
|
||||
"Survey: Matching Address ID": closest_match["Address ID"],
|
||||
'Distance to Closest Match (m)': closest_match["distance_meters"],
|
||||
"Package Ref": closest_match["Package Ref"],
|
||||
"Package Ref": package_ref,
|
||||
"Match Type": match_type
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue