This commit is contained in:
Cullen Watson
2024-04-16 20:01:20 -05:00
committed by GitHub
parent 6076b0f961
commit 7246703999
6 changed files with 43 additions and 15 deletions

View File

@@ -34,6 +34,7 @@ ordered_properties = [
"agent",
"broker",
"broker_phone",
"nearby_schools",
"primary_photo",
"alt_photos",
]
@@ -60,6 +61,8 @@ def process_result(result: Property) -> pd.DataFrame:
prop_data["broker_phone"] = agents[1].phone
prop_data["price_per_sqft"] = prop_data["prc_sqft"]
prop_data["nearby_schools"] = filter(None, prop_data["nearby_schools"]) if prop_data["nearby_schools"] else None
prop_data["nearby_schools"] = ", ".join(set(prop_data["nearby_schools"])) if prop_data["nearby_schools"] else None
description = result.description
prop_data["primary_photo"] = description.primary_photo