修复bug
This commit is contained in:
@@ -36,6 +36,9 @@ def sync(city=None):
|
|||||||
if len(deal_price_df) <= 0:
|
if len(deal_price_df) <= 0:
|
||||||
log.info(f"无成交,无需同步")
|
log.info(f"无成交,无需同步")
|
||||||
return
|
return
|
||||||
|
if 'match_city' not in deal_price_df.columns or 'match_region' not in deal_price_df.columns or 'match_name' not in deal_price_df.columns:
|
||||||
|
log.info(f"无成交,无需同步")
|
||||||
|
return
|
||||||
deal_price_df = deal_price_df[['match_city', 'match_region', 'match_name', 'avg_price']]
|
deal_price_df = deal_price_df[['match_city', 'match_region', 'match_name', 'avg_price']]
|
||||||
deal_price_df = deal_price_df.rename(columns={'match_city': 'city', 'match_region': 'region', 'match_name': 'name',
|
deal_price_df = deal_price_df.rename(columns={'match_city': 'city', 'match_region': 'region', 'match_name': 'name',
|
||||||
'avg_price': 'three_month_trade_avg_price'})
|
'avg_price': 'three_month_trade_avg_price'})
|
||||||
|
|||||||
Reference in New Issue
Block a user