fix bug
This commit is contained in:
@@ -147,6 +147,7 @@ def calcByCity(city, year_month):
|
|||||||
print("开始计算年" + str(year_month) + "写字楼基准价")
|
print("开始计算年" + str(year_month) + "写字楼基准价")
|
||||||
|
|
||||||
sample = es.scan_by_sql_to_data_frame(sql)
|
sample = es.scan_by_sql_to_data_frame(sql)
|
||||||
|
print("样本SQL:" + sql + "样本量:" +str(len(sample)))
|
||||||
office = getOffice(city)
|
office = getOffice(city)
|
||||||
|
|
||||||
update_office(city, office, sample, year_month)
|
update_office(city, office, sample, year_month)
|
||||||
@@ -158,7 +159,7 @@ def update_office(city, office, sample, year_month):
|
|||||||
if 'estate_type2' not in office.columns:
|
if 'estate_type2' not in office.columns:
|
||||||
office['estate_type2'] = None
|
office['estate_type2'] = None
|
||||||
if sample.empty:
|
if sample.empty:
|
||||||
return
|
return
|
||||||
sample_new = sample
|
sample_new = sample
|
||||||
if 'alias' not in sample_new.columns:
|
if 'alias' not in sample_new.columns:
|
||||||
sample_new['alias'] = None
|
sample_new['alias'] = None
|
||||||
|
|||||||
@@ -4,4 +4,5 @@ pykalman==0.9.5
|
|||||||
matplotlib
|
matplotlib
|
||||||
kafka-python==2.0.2
|
kafka-python==2.0.2
|
||||||
tqdm
|
tqdm
|
||||||
tabulate==0.9.0
|
tabulate==0.9.0
|
||||||
|
kafka==1.3.5
|
||||||
Reference in New Issue
Block a user