From 6fe4240883216ec6452e479e5344be28b949a096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E5=81=A5?= Date: Thu, 6 Mar 2025 11:35:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dags/business/business/community/other.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dags/business/business/community/other.py b/dags/business/business/community/other.py index c16dcd6..07937ec 100644 --- a/dags/business/business/community/other.py +++ b/dags/business/business/community/other.py @@ -19,7 +19,7 @@ count = 0 def deal(actions, x): global count doc_info = dict() - if pd.notna(x['avg_price']) and pd.notna(x['rent_price']): + if 'rent_price' in x and pd.notna(x['avg_price']) and pd.notna(x['rent_price']): doc_info['sell_to_rent'] = int(x['avg_price'] / x['rent_price']) if pd.notna(x['household_count']): doc_info['person_num'] = int(x['household_count'] * 2.3)