调试
This commit is contained in:
@@ -50,11 +50,19 @@ def find_around_price(city_now, lng, lat):
|
|||||||
|
|
||||||
def build_doc(item):
|
def build_doc(item):
|
||||||
doc_dict = dict()
|
doc_dict = dict()
|
||||||
|
if item['_id'] == '50bd172ae4b0fbe60a6fe628':
|
||||||
|
print("build_doc")
|
||||||
if 'avg_cost' in item:
|
if 'avg_cost' in item:
|
||||||
|
if item['_id'] == '50bd172ae4b0fbe60a6fe628':
|
||||||
|
print("avg_cost")
|
||||||
if pd.notna(item['avg_cost']):
|
if pd.notna(item['avg_cost']):
|
||||||
|
if item['_id'] == '50bd172ae4b0fbe60a6fe628':
|
||||||
|
print(int(item['avg_cost']))
|
||||||
doc_dict['avg_cost'] = int(item['avg_cost'])
|
doc_dict['avg_cost'] = int(item['avg_cost'])
|
||||||
else:
|
else:
|
||||||
doc_dict['avg_cost'] = None
|
doc_dict['avg_cost'] = None
|
||||||
|
if item['_id'] == '50bd172ae4b0fbe60a6fe628':
|
||||||
|
print(doc_dict)
|
||||||
return doc_dict
|
return doc_dict
|
||||||
|
|
||||||
|
|
||||||
@@ -121,7 +129,9 @@ def sync(city=None):
|
|||||||
print(lat)
|
print(lat)
|
||||||
print(price)
|
print(price)
|
||||||
if pd.notna(price):
|
if pd.notna(price):
|
||||||
|
print("price赋值结果")
|
||||||
seaweed_df.loc[index, 'avg_cost'] = price
|
seaweed_df.loc[index, 'avg_cost'] = price
|
||||||
|
print(True)
|
||||||
else:
|
else:
|
||||||
seaweed_df.loc[index, 'avg_cost'] = None
|
seaweed_df.loc[index, 'avg_cost'] = None
|
||||||
with ThreadPoolExecutor(max_workers=30) as pool:
|
with ThreadPoolExecutor(max_workers=30) as pool:
|
||||||
|
|||||||
Reference in New Issue
Block a user