mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
cleaning up unmatched submissions
This commit is contained in:
parent
83a1ac8cf3
commit
d585e173be
1 changed files with 23 additions and 1 deletions
|
|
@ -2388,6 +2388,26 @@ class AssetList:
|
|||
unmatched_df = master_data[
|
||||
master_data["row_id"].isin(unmatched)
|
||||
]
|
||||
|
||||
scheme_col = (
|
||||
"AFFORDABLE WARMTH OR EPC FOR HOUSING ASSOCIATION" if
|
||||
"AFFORDABLE WARMTH OR EPC FOR HOUSING ASSOCIATION" in master_data.columns else "AFFORDABLE WARMTH"
|
||||
)
|
||||
# The columns are massively different - we take just a few
|
||||
unmatched_df = unmatched_df[
|
||||
[
|
||||
scheme_col, house_no_col, "Street / Block Name", postcode_col, install_col, submission_col
|
||||
]
|
||||
].rename(
|
||||
columns={
|
||||
scheme_col: "Funding Scheme",
|
||||
house_no_col: "House Number",
|
||||
postcode_col: "Postcode",
|
||||
install_col: "survey_status",
|
||||
submission_col: "submission_date"
|
||||
}
|
||||
)
|
||||
|
||||
unmatched_submissions.append(unmatched_df)
|
||||
|
||||
master_surveyed = pd.concat(master_surveyed)
|
||||
|
|
@ -2411,4 +2431,6 @@ class AssetList:
|
|||
|
||||
# Finally, we keep a record of the unmatched
|
||||
if unmatched_submissions:
|
||||
self.unmatched_submissions = pd.concat(unmatched_submissions)
|
||||
self.unmatched_submissions = pd.concat(
|
||||
unmatched_submissions
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue