This commit is contained in:
2025-08-20 12:28:59 +08:00
parent fde96a1886
commit e5d39afc20
+3
View File
@@ -458,6 +458,9 @@ def getOffice(city, district=None, name=None):
if pd.notna(city):
query['name'] = name
office = pd.DataFrame(list(seaweed_df.find(query).batch_size(10000)))
for col in ['city', 'region', 'name', 'alias', 'estate_type2', 'bed_kind', 'lng', 'lat']:
if col not in office:
office[col] = None
office = office[['city', 'region', 'name', 'alias', 'estate_type2', 'bed_kind', 'lng', 'lat']]
office = office.explode('alias')
return office