Model/etl/customers/lincs_rural/prepare_data.py
2025-12-10 17:56:53 +00:00

26 lines
662 B
Python

"""
Rough script to prepare the data for Lincs Rural project
"""
import pandas as pd
from etl.find_my_epc.RetrieveFindMyEpc import RetrieveFindMyEpc
data = pd.read_excel(
"/Users/khalimconn-kowlessar/Downloads/MASTER LIST EPCS UPDATED November 2025 Domna Homes.xlsx",
sheet_name="PROPERTY EPC RATINGS"
)
# We have property RRNs - we need UPRN
for _, x in data.iterrows():
rrn = x["EPC Ref."]
# Fetch from find my epc
retriever = RetrieveFindMyEpc(
address="",
postcode="",
rrn=rrn,
address_postal_town="",
sap_rating=x["Actual"]
)
find_epc_data = retriever.retrieve_all_find_my_epc_data()