This commit is contained in:
沈健
2025-04-23 17:50:31 +08:00
parent 47bb142987
commit bc7a02d319
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ if type == month_last:
log.info(f"测试月份:{month_now}")
price_df = pgsql.scan_by_sql_to_data_frame(f"select urbn_id,urbn_nm,gujia_admndiv_nm,gujia_bds_id as gujia_comm_id,comm_nm,gujia_bds_clmtd,gujia_comm_basic_prc from price_stat.avm_community_base_price where gujiabds_clc_yrmo_val={month_now} ")
deal_df = pgsql.scan_by_sql_to_data_frame(f"select gujia_bds_mdl_id,gujia_comm_id,gujia_bds_trdtckt_prc from base.bigdata_deal_gj_h where to_char(txn_dt,'yyyyMM')='{month_last}' ")
deal_df = pgsql.scan_by_sql_to_data_frame(f"select gujia_bds_mdl_id,gujia_comm_id,gujia_bds_trdtckt_prc from base.bigdata_deal where to_char(txn_dt,'yyyyMM')='{month_last}' ")
deal_price_df = deal_df.merge(price_df, on="gujia_comm_id", how="left")
deal_price_df["ppe"] = round((deal_price_df["gujia_comm_basic_prc"] - deal_price_df['gujia_bds_trdtckt_prc']) / deal_price_df['gujia_bds_trdtckt_prc'], 4)
#deal_price_df = deal_price_df[abs(deal_price_df['ppe']) > 0.15]