debugging string data

This commit is contained in:
Khalim Conn-Kowlessar 2024-11-05 14:24:50 +00:00
parent 2f930e3fa2
commit 557c0b5898

View file

@ -131,10 +131,14 @@ def rename_and_add_columns(epcs):
}
)
epcs["Number of Habitable Rooms"] = epcs["Number of Habitable Rooms"].astype(int)
epcs["Property Floor Area"] = epcs["Property Floor Area"].astype(float)
# Add additional columns as in your original code
epcs["Estimated Number of Floors"] = epcs.apply(
lambda x: estimate_number_of_floors(x["Property Type"]) if pd.notnull(x["Property Type"]) else None, axis=1
)
epcs["Estimated Perimeter (m)"] = epcs.apply(
lambda x: estimate_perimeter(
x["Property Floor Area"] / x["Estimated Number of Floors"],
@ -167,7 +171,9 @@ def main():
"""
# This should be set:
output_filepath = "/Users/khalimconn-kowlessar/Documents/hestia/Route Marches/PRS and OO properties - WC 11.11.2024"
output_filepath = (
"/Users/khalimconn-kowlessar/Documents/hestia/Route Marches/PRS and OO properties - WC 11.11.2024.xlsx"
)
client = EpcClient(auth_token=EPC_AUTH_TOKEN)
writer = pd.ExcelWriter(output_filepath, engine="xlsxwriter")