mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
re-added dropping of columns and changed default floor height to 2.4
This commit is contained in:
parent
a7aecb2462
commit
4443f1aa4b
1 changed files with 28 additions and 1 deletions
|
|
@ -111,6 +111,33 @@ def filter_and_prepare_epcs(epcs):
|
|||
|
||||
|
||||
def rename_and_add_columns(epcs):
|
||||
# Retrieve just the data we need
|
||||
epcs = epcs[
|
||||
[
|
||||
"uprn",
|
||||
"address",
|
||||
"postcode",
|
||||
"property-type",
|
||||
"built-form",
|
||||
"inspection-date",
|
||||
"current-energy-rating",
|
||||
"current-energy-efficiency",
|
||||
"roof-description",
|
||||
"walls-description",
|
||||
"transaction-type",
|
||||
# New fields needed
|
||||
"secondheat-description",
|
||||
"total-floor-area",
|
||||
"construction-age-band",
|
||||
"floor-height",
|
||||
"number-habitable-rooms",
|
||||
"mainheat-description",
|
||||
#
|
||||
"energy-consumption-current", # kwh/m2
|
||||
"tenure"
|
||||
]
|
||||
]
|
||||
|
||||
epcs = epcs.rename(
|
||||
columns={
|
||||
"address": "Address",
|
||||
|
|
@ -151,7 +178,7 @@ def rename_and_add_columns(epcs):
|
|||
epcs["Estimated Heat Loss Perimeter (m2)"] = epcs.apply(
|
||||
lambda x: estimate_external_wall_area(
|
||||
x["Estimated Number of Floors"],
|
||||
float(x["Property Floor Height"]) if x["Property Floor Height"] else 2.5,
|
||||
float(x["Property Floor Height"]) if x["Property Floor Height"] else 2.4,
|
||||
x["Estimated Perimeter (m)"],
|
||||
x["Archetype"]
|
||||
), axis=1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue