From f76043e0e36445c7803141970ee13c789f578a7b Mon Sep 17 00:00:00 2001 From: "shenjian@fangjia.com" Date: Tue, 21 Feb 2023 10:36:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dags/business/business/community/total_price_complete.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dags/business/business/community/total_price_complete.py b/dags/business/business/community/total_price_complete.py index a2f07a6..1c75677 100644 --- a/dags/business/business/community/total_price_complete.py +++ b/dags/business/business/community/total_price_complete.py @@ -62,6 +62,9 @@ def complete_by_build_year_area(community_factor_df): for index, build_year_area in build_year_area_df.iterrows(): build_year_area_dict[ build_year_area['city'] + '|' + build_year_area['region'] + "|" + build_year_area['buildyear']] = build_year_area['factor'] + # 修复按城市跑批数据字段可能不存在问题 + if 'finish_building_date' not in community_factor_df.columns or 'total_price' not in community_factor_df.columns: + return False for index, item in community_factor_df[ (community_factor_df['total_price'].isna()) & (community_factor_df['finish_building_date'].notna())].iterrows(): finish_building_date = item['finish_building_date']