优化
This commit is contained in:
@@ -70,7 +70,7 @@ def save_fix(community_summary_df):
|
|||||||
|
|
||||||
|
|
||||||
def save_fill(community_summary_df):
|
def save_fill(community_summary_df):
|
||||||
if 'estate_charge' not in community_summary_df.columns:
|
if 'estate_charge' not in community_summary_df.columns or 'estate_charge_score' not in community_summary_df.columns:
|
||||||
log.info("该城市无补充物业费")
|
log.info("该城市无补充物业费")
|
||||||
return
|
return
|
||||||
df = community_summary_df[['_id', 'city', 'estate_charge', 'estate_charge_score']]
|
df = community_summary_df[['_id', 'city', 'estate_charge', 'estate_charge_score']]
|
||||||
@@ -307,8 +307,6 @@ def fill_estate_charge(city_now):
|
|||||||
with ThreadPoolExecutor(max_workers=30) as pool:
|
with ThreadPoolExecutor(max_workers=30) as pool:
|
||||||
for community_summary in community_summary_list:
|
for community_summary in community_summary_list:
|
||||||
pool.submit(deal_fill, community_summary)
|
pool.submit(deal_fill, community_summary)
|
||||||
# for community_summary in community_summary_list:
|
|
||||||
# deal_fill(community_summary)
|
|
||||||
community_summary_df = pd.DataFrame(community_summary_list)
|
community_summary_df = pd.DataFrame(community_summary_list)
|
||||||
save_fill(community_summary_df)
|
save_fill(community_summary_df)
|
||||||
log.info(f"{city_now}完成补充物业费....")
|
log.info(f"{city_now}完成补充物业费....")
|
||||||
|
|||||||
Reference in New Issue
Block a user