From 279663f351f6386f649d9fdeca64b0e41b648da1 Mon Sep 17 00:00:00 2001 From: "shenjian@fangjia.com" Date: Tue, 9 May 2023 13:40:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=A0=BC=E5=AD=90=E5=9D=87?= =?UTF-8?q?=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dags/business/business/grid_price.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dags/business/business/grid_price.py b/dags/business/business/grid_price.py index b8c2fbf..e1d31f5 100644 --- a/dags/business/business/grid_price.py +++ b/dags/business/business/grid_price.py @@ -80,7 +80,6 @@ def sync(city): continue grid_info = dict() price_list = list() - price_info = dict() for estate_type in estate_type_list: # 计算不同物业类型的小区均价 comm_info_estate_type_df = comm_info_df[comm_info_df['estate_type'] == estate_type].copy() @@ -88,6 +87,7 @@ def sync(city): comm_info_estate_type_df = pd.merge(comm_info_estate_type_df, avg_price_df, how='left', on=['city', 'region', 'name']) comm_info_estate_type_df = comm_info_estate_type_df[comm_info_estate_type_df['avg_price'].notna()] if len(comm_info_estate_type_df) > 0: + price_info = dict() price_info['type'] = 'district' price_info['secondly_type'] = estate_type price_info['price'] = int(comm_info_estate_type_df['avg_price'].mean())