修复商铺均价BUG
This commit is contained in:
@@ -20,7 +20,7 @@ def calc(city, year_month):
|
||||
"select * from latest_seawater where cat='shop_sell' and city='" + city + "' and p_date>=" + str(
|
||||
year_month) + "01 and p_date<=" + str(year_month) + "31 ")
|
||||
if len(shop) > 0:
|
||||
shop['day_avg_price'] = shop['avg_price'] / 30
|
||||
shop['day_avg_price'] = shop['avg_price']
|
||||
# 计算总价的Z-score
|
||||
shop['Z_Score'] = (shop['day_avg_price'] - shop['day_avg_price'].mean()) / shop['day_avg_price'].std()
|
||||
# 剔除Z-score超过0.1的异常值
|
||||
|
||||
Reference in New Issue
Block a user