From 6c69efaed462af013abb9dd260befdfefed35f33 Mon Sep 17 00:00:00 2001 From: wangwenyan Date: Thu, 19 Jun 2025 14:52:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A5=BC=E7=9B=98=E8=AF=84?= =?UTF-8?q?=E7=BA=A7-=E4=BC=98=E5=8C=96=E6=8E=92=E5=90=8D=E7=AE=97?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dags/stat/community/community_rate.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dags/stat/community/community_rate.py b/dags/stat/community/community_rate.py index dd93e57..d5f35bf 100644 --- a/dags/stat/community/community_rate.py +++ b/dags/stat/community/community_rate.py @@ -259,8 +259,7 @@ def load_comm_stat(city): firstDayOfThisMonth = dateutils.parse_date(dateutils.format_date(datetime.utcnow(), "%Y-%m"), "%Y-%m") lastDayOfPreMonth = dateutils.add_months(firstDayOfThisMonth, days=-1) - sqmetre_rent = pd.DataFrame(list( - sqmetre_rent_client.find({"weekend": lastDayOfPreMonth, "cat": "district", "city": city}, + sqmetre_rent = pd.DataFrame(list(sqmetre_rent_client.find({"weekend": lastDayOfPreMonth, "cat": "district", "city": city}, {"city": 1, "region": 1, "district_name": 1, "avg_price": 1, "_id": 0}))) sqmetre_rent = sqmetre_rent.rename(columns={"district_name": "name", "avg_price": "sqmetre_rent"}) stat = stat.merge(sqmetre_rent, on=['city', 'region', 'name'], how='left')