This commit is contained in:
shenjian@fangjia.com
2023-03-09 15:44:54 +08:00
parent 8d37a92cf6
commit 9245b3fe96
+1 -7
View File
@@ -50,12 +50,8 @@ def find_around_price(city_now, lng, lat):
def build_doc(item):
doc_dict = dict()
if item['_id'] == '50bd172ae4b0fbe60a6fe628':
print("build_doc")
if 'avg_cost' in item:
if item['_id'] == '50bd172ae4b0fbe60a6fe628':
print("avg_cost")
if pd.notna(item['avg_cost']):
if pd.notna(item['avg_cost']) or item['avg_cost'] > 0:
if item['_id'] == '50bd172ae4b0fbe60a6fe628':
print(int(item['avg_cost']))
doc_dict['avg_cost'] = int(item['avg_cost'])
@@ -129,9 +125,7 @@ def sync(city=None):
print(lat)
print(price)
if pd.notna(price):
print("price赋值结果")
seaweed_df.loc[index, 'avg_cost'] = price
print(True)
else:
seaweed_df.loc[index, 'avg_cost'] = None
with ThreadPoolExecutor(max_workers=30) as pool: