mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
set up asset list
This commit is contained in:
parent
cf7627a8d7
commit
b791ecb054
1 changed files with 20 additions and 1 deletions
|
|
@ -41,4 +41,23 @@ def app():
|
|||
raw_asset_list["address"] = raw_asset_list["Full Address"].str.split(",").str[0]
|
||||
raw_asset_list["postcode"] = raw_asset_list["Full Address"].str.split(",").str[-1].str.strip()
|
||||
|
||||
raw_asset_list[["address", "postcode"]].to_dict("records")
|
||||
council_tax_bands = pd.DataFrame(council_tax_bands)
|
||||
asset_list = raw_asset_list.merge(council_tax_bands, how="left", on=["address", "postcode"])
|
||||
|
||||
# Store the data in s3
|
||||
filename = f"{USER_ID}/{PORTFOLIO_ID}/pilot.csv"
|
||||
save_csv_to_s3(
|
||||
dataframe=asset_list,
|
||||
bucket_name="retrofit-plan-inputs-dev",
|
||||
file_name=filename
|
||||
)
|
||||
|
||||
body = {
|
||||
"portfolio_id": str(PORTFOLIO_ID),
|
||||
"housing_type": "Private",
|
||||
"goal": "Increase EPC",
|
||||
"goal_value": "A",
|
||||
"trigger_file_path": filename,
|
||||
"budget": None,
|
||||
}
|
||||
print(body)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue