added some restrictions on creation of file input

This commit is contained in:
Khalim Conn-Kowlessar 2023-10-11 20:55:36 +08:00
parent 7c943b8c1c
commit 042fbea083

View file

@ -9,10 +9,10 @@ import pandas as pd
from epc_api.client import EpcClient
from utils.s3 import save_csv_to_s3
FILE_SIZE = 100
FILE_SIZE = 250
EPC_AUTH_TOKEN = os.getenv("EPC_AUTH_TOKEN", None)
USER_ID = 2
PORTFOLIO_ID = 47
USER_ID = 8
PORTFOLIO_ID = 48
def app():
@ -48,6 +48,14 @@ def app():
+ a_data["rows"]
)
# TODO: We also take homes with just a specific type of wall
final_data = [
x for x in final_data if ("cavity wall" in x["walls-description"].lower()) or (
"solid brick" in x["walls-description"].lower()
) or ("average thermal transmittance" in x["walls-description"].lower())
]
# TODO: For the moment, don't use park homes
final_csv_data = pd.DataFrame(
[{"address": x["address"], "postcode": x["postcode"], "Notes": None} for x