新增格子均价
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user