优化统计

This commit is contained in:
shenjian@fangjia.com
2023-03-22 18:20:38 +08:00
parent 65d128dde2
commit 3d2acbddaa
@@ -159,12 +159,12 @@ clickHouseClient.to_sql(df, table='community_coverage_stat', if_exists='insert',
# 上传至nextcloud
ret_df = pd.merge(ret_df, df, how='left', on=['city'])
del ret_df['是否合理']
ret_df = ret_df.rename(columns={'city': '城市', 'city_level': '城市级别', 'community_count': "楼盘数量", "alias_count": "别名数量", "addr_alias_count": "地址别名数量", "exist_alias_community_count": "有别名覆盖小区数量"})
output_date = dateutils.format_date(dateutils.datetime.datetime.now())
aim_file_name = aim_path + "/" + output_date + '覆盖率统计.xlsx'
df.to_excel(aim_file_name, index=False)
ret_df.to_excel(aim_file_name, index=False)
# https://nextcloud.fangjia.com/s/3aw663fy9BbiBeL
# https://nextcloud.fangjia.com/s/3aw663fy9BbiBeLji'bie
def up_to_nextcloud():
"""