From 8fd76993fc4a576be18c5e998e189258f0bc7712 Mon Sep 17 00:00:00 2001 From: wangwenyan Date: Mon, 29 Dec 2025 15:16:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=97=A0=E7=94=A8=E7=9A=84?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dags/office/sell/base_price.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dags/office/sell/base_price.py b/dags/office/sell/base_price.py index 16a875b..a92c708 100644 --- a/dags/office/sell/base_price.py +++ b/dags/office/sell/base_price.py @@ -112,7 +112,7 @@ def calcByOffice(city, district, office_name): average_price = np.mean(avg_prices) if len(avg_prices) > 0 else 0 if average_price > 0: new_avg_price = int(average_price) - else: + elif "avg_price" in sample.columns: # 取样本的平均值 new_avg_price = int(sample['avg_price'].mean()) if pd.notna(new_avg_price):