优化
This commit is contained in:
@@ -68,13 +68,13 @@ def get_sample(cityid):
|
||||
return data_df
|
||||
|
||||
def get_deal(cityid):
|
||||
sql = f"select urbn_id,gujia_comm_id,comm_nm,guiabconstructionarea,gujia_bds_trdtckt_prc from base.bigdata_deal_gj_h where urbn_id='{cityid}' and txn_dt >= TO_DATE('2024-03-01','YYYY-MM-DD') and txn_dt < TO_DATE('2024-04-01','YYYY-MM-DD')"
|
||||
sql = f"select urbn_id,gujia_comm_id,comm_nm,guiabconstructionarea,gujia_bds_trdtckt_prc from base.bigdata_deal where urbn_id='{cityid}' and txn_dt >= TO_DATE('2024-03-01','YYYY-MM-DD') and txn_dt < TO_DATE('2024-04-01','YYYY-MM-DD')"
|
||||
data_df = pgdb.read(sql)
|
||||
data_df = data_df.rename(columns={'urbn_id': 'cityid','gujia_comm_id': '_id','comm_nm': 'name', 'guiabconstructionarea': 'area','gujia_bds_trdtckt_prc': 'deal_price'})
|
||||
return data_df
|
||||
|
||||
def get_deal_data(cityid):
|
||||
sql = f"select * from base.bigdata_deal_gj_h where urbn_id='{cityid}' and txn_dt >= TO_DATE('2024-03-01','YYYY-MM-DD') and txn_dt < TO_DATE('2024-04-01','YYYY-MM-DD')"
|
||||
sql = f"select * from base.bigdata_deal where urbn_id='{cityid}' and txn_dt >= TO_DATE('2024-03-01','YYYY-MM-DD') and txn_dt < TO_DATE('2024-04-01','YYYY-MM-DD')"
|
||||
data_df = pgdb.read(sql)
|
||||
return data_df
|
||||
|
||||
|
||||
Reference in New Issue
Block a user