户均总价逻辑修改

This commit is contained in:
shenjian@fangjia.com
2022-10-28 14:00:24 +08:00
parent 9a139d953f
commit b1de7f5219
3 changed files with 14 additions and 15 deletions
@@ -65,10 +65,10 @@ def sync(city=None):
if (curr_city + curr_region + curr_name) in avg_price_map:
avg_price = avg_price_map[curr_city + curr_region + curr_name]
if pd.notna(avg_price):
min_avg_price = 0.8 * avg_price
max_avg_rice = 1.2 * avg_price
total_price = commutils.get_total_price(curr_city, curr_region, names, day_before=366,
min_avg_price=min_avg_price, max_avg_price=max_avg_rice)
# 由于覆盖率较低,暂不过滤
# min_avg_price = 0.8 * avg_price
# max_avg_rice = 1.2 * avg_price
total_price = commutils.get_total_price(curr_city, curr_region, names, day_before=366)
seaweed_df.loc[index, 'total_price'] = total_price
for index, item in seaweed_df.iterrows():