diff --git a/dags/office/sell/base_price.py b/dags/office/sell/base_price.py index 0d0a3bc..0cc72d1 100644 --- a/dags/office/sell/base_price.py +++ b/dags/office/sell/base_price.py @@ -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