优化财力评级
This commit is contained in:
@@ -25,15 +25,8 @@ if not os.path.exists(save_png_path):
|
|||||||
|
|
||||||
nextcloud_aim_file_path = '共享/财力评级/财力评级图'
|
nextcloud_aim_file_path = '共享/财力评级/财力评级图'
|
||||||
|
|
||||||
|
reasonable_df = pd.read_excel(path + '/财力评级分布情况20221215.xlsx')
|
||||||
factor_df = pd.read_excel(path + '/财力评级极值设置.xlsx')
|
reasonable_dict = reasonable_df.set_index('city')['是否合理'].to_dict()
|
||||||
factor_dict = dict()
|
|
||||||
for index, item in factor_df.iterrows():
|
|
||||||
if pd.isna(item['min_total_price']):
|
|
||||||
continue
|
|
||||||
factor_dict[item['city']] = {'min_total_price': item['min_total_price'], 'max_total_price': item['max_total_price'], 'min_estate_charge': item['min_estate_charge'], 'max_estate_charge': item['max_estate_charge'], \
|
|
||||||
'min_avg_cost': item['min_avg_cost'], 'max_avg_cost': item['max_avg_cost']}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def calc_consumption_potential(city):
|
def calc_consumption_potential(city):
|
||||||
@@ -168,7 +161,8 @@ def sync_by_city(city_now):
|
|||||||
|
|
||||||
def sync(city=None):
|
def sync(city=None):
|
||||||
if pd.isna(city):
|
if pd.isna(city):
|
||||||
for city_now in factor_df['city'].unique():
|
for city_now in reasonable_df['city'].unique():
|
||||||
|
#if pd.isna(reasonable_dict[city_now]):
|
||||||
sync_by_city(city_now)
|
sync_by_city(city_now)
|
||||||
else:
|
else:
|
||||||
sync_by_city(city)
|
sync_by_city(city)
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user