From 224b48655d432d0b181142fd14f8a617346635c6 Mon Sep 17 00:00:00 2001 From: "shenjian@fangjia.com" Date: Tue, 22 Nov 2022 16:10:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=89=A9=E4=B8=9A=E8=B4=B9?= =?UTF-8?q?=E8=AF=84=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dags/business/business/community/estate_charge_ranking.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dags/business/business/community/estate_charge_ranking.py b/dags/business/business/community/estate_charge_ranking.py index 2927cf8..5e50b2e 100644 --- a/dags/business/business/community/estate_charge_ranking.py +++ b/dags/business/business/community/estate_charge_ranking.py @@ -16,7 +16,7 @@ es206_client = ElasticSearchClient(host='192.168.0.206') index_name = "community_summary" path = "/opt/airflow/dags/repo/dags/business/business/community/data" -nextcloud_aim_file_path = '共享/财力评级/物业费等级分布图' +nextcloud_aim_file_path = '共享/财力评级/物业费等级图' save_path_prefix = "/home/airflow/data/community" save_png_path = save_path_prefix + "/estate_charge_ranking" @@ -119,8 +119,9 @@ def save_png(city=None): """ 生成财力评级图表 """ - sql = "select id, city, region, name, consumption_rating from community_summary where city='" + city + "'" - community_city = es206_client.scan_by_sql_to_data_frame(sql) + sql = "select id, city, region, name, estate_charge_ranking, estate_charge from community_summary where city='" + city + "'" + community_summary_df = es206_client.scan_by_sql_to_data_frame(sql) + community_city = filter_min_max(city, community_summary_df).copy() plt.subplot(2, 1, 1) community_city['estate_charge_ranking'].hist(bins=100) plt.xlabel('estate_charge_ranking')