From 3ab1d318528903bf943665380cd89e0fb8b583f6 Mon Sep 17 00:00:00 2001 From: "shenjian@fangjia.com" Date: Wed, 29 Mar 2023 15:20:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AD=97=E6=AE=B5=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dags/stat/community/community_count_price_rent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dags/stat/community/community_count_price_rent.py b/dags/stat/community/community_count_price_rent.py index 9138b2d..fa94b89 100644 --- a/dags/stat/community/community_count_price_rent.py +++ b/dags/stat/community/community_count_price_rent.py @@ -95,7 +95,7 @@ df['main_type_area_coverage'] = df['main_type_area_count'] * 100 / df['community # 物业类型 estate_type_count = pd.DataFrame(list(seaweed_conn.aggregate([ {'$match': {'cat': 'district', 'status': 0, 'estate_type2': {'$ne': None}}}, - {'$group': {'_id': "$city", 'estate_charge_count': {'$sum': 1}}}]))) + {'$group': {'_id': "$city", 'estate_type_count': {'$sum': 1}}}]))) estate_type_count = estate_type_count.rename(columns={'_id': 'city'}) df = pd.merge(df, estate_type_count, how='left', on=['city']) df['estate_type_coverage'] = df['estate_type_count'] * 100 / df['community_count']