diff --git a/PriceSystem/sell_price/zhuge0118A.py b/PriceSystem/sell_price/zhuge0118A.py index 942aab8..e0a189f 100644 --- a/PriceSystem/sell_price/zhuge0118A.py +++ b/PriceSystem/sell_price/zhuge0118A.py @@ -505,6 +505,7 @@ def commonprice(ct, rl, p): # t1=time.time() #print("location['lng2'][0]",location['lng2'].iloc[0]) + dd = neighbor(location['lng2'].iloc[0], location['lat2'].iloc[0], 5, ct, rl, p) # print(time.time()-t1,'t1'*10) # print('dd=',dd,'dd'*20) @@ -542,29 +543,21 @@ def commonprice(ct, rl, p): #print(time.time() - svr_time, 'e' * 10) # print('other1=',other1) return other1, dd2.shape[0] + else: - dd3 = neighbor(location['lng2'].iloc[0], location['lat2'].iloc[0], 100, ct, rl, p) + + dd6 = neighbor_km(location['lng2'].iloc[0], location['lat2'].iloc[0], 30, ct, rl, p) # print('dd2=',dd2,'@'*60) - if dd3.shape[0] >= factor: + if dd6.shape[0] >= 20: # svr_time=time.time() - other1 = svr(dd3, lk) + other1 = svr(dd6, lk) + + #print('#'*20) # print(time.time()-svr_time,'svr'*10) # print('other1=',other1) - return other1, dd3.shape[0] + return other1, dd6.shape[0] else: - - dd6 = neighbor_km(location['lng2'].iloc[0], location['lat2'].iloc[0], 30, ct, rl, p) - # print('dd2=',dd2,'@'*60) - if dd6.shape[0] >= 20: - # svr_time=time.time() - other1 = svr(dd6, lk) - - #print('#'*20) - # print(time.time()-svr_time,'svr'*10) - # print('other1=',other1) - return other1, dd6.shape[0] - else: - return '没有周围小区数据', 0 + return '没有周围小区数据', 0 def region_district_list(ct, rl): # import pandas diff --git a/PriceSystem/test.py b/PriceSystem/test.py index 9aa0c0c..71f01ef 100644 --- a/PriceSystem/test.py +++ b/PriceSystem/test.py @@ -34,18 +34,19 @@ rl = '海珠' lk = '会展世界城三期' ''' #成都- 都江堰- 溪岭雪#上海徐汇 灞桥沁水新城百汇园西 安 未央 兴乐园 弘和美邻馆 雁塔鸿景花园上海 奉贤 万隆花苑 -ct='上海' -rl='奉贤' -lk='棕榈滩别墅' -#成都双流长滩一号 上海 奉贤 朝阳新村##上海 奉贤 棕榈滩别墅 +ct='深圳' +rl='龙岗' +lk='丽皇阁' +#成都双流长滩一号 上海 奉贤 朝阳新村##上海 奉贤 棕榈滩别墅深圳龙岗丽皇阁 #未央 weekend = datetime.datetime.strptime("2018-03-25", "%Y-%m-%d") #for i in range(0, 100): -e = time.time() + sellPrice.out_put_price(ct, rl, lk, fangjia.get_weekend()) +e = time.time() print(e - s) '''