From 203920ad6c411f5edeb9d6abf9ff79146a46e1f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=96=87=E8=89=B3?= Date: Wed, 20 Aug 2025 14:00:31 +0800 Subject: [PATCH] fix bug --- dags/office/sell/base_price.py | 3 ++- dags/requirements.txt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dags/office/sell/base_price.py b/dags/office/sell/base_price.py index 969b32b..8364afe 100644 --- a/dags/office/sell/base_price.py +++ b/dags/office/sell/base_price.py @@ -147,6 +147,7 @@ def calcByCity(city, year_month): print("开始计算年" + str(year_month) + "写字楼基准价") sample = es.scan_by_sql_to_data_frame(sql) + print("样本SQL:" + sql + "样本量:" +str(len(sample))) office = getOffice(city) update_office(city, office, sample, year_month) @@ -158,7 +159,7 @@ def update_office(city, office, sample, year_month): if 'estate_type2' not in office.columns: office['estate_type2'] = None if sample.empty: - return + return sample_new = sample if 'alias' not in sample_new.columns: sample_new['alias'] = None diff --git a/dags/requirements.txt b/dags/requirements.txt index 1194535..afa4ada 100644 --- a/dags/requirements.txt +++ b/dags/requirements.txt @@ -4,4 +4,5 @@ pykalman==0.9.5 matplotlib kafka-python==2.0.2 tqdm -tabulate==0.9.0 \ No newline at end of file +tabulate==0.9.0 +kafka==1.3.5 \ No newline at end of file