新增重点小学、重点中学
This commit is contained in:
@@ -80,11 +80,12 @@ def deal(actions, item):
|
||||
|
||||
def sync(city=None):
|
||||
log.info(f"开始同步教育资源【小学、中学】至206 {index_name}")
|
||||
seaweed_query = {'status': 0, 'cat': 'district'}
|
||||
if pd.notna(city):
|
||||
seaweed_query['city'] = city
|
||||
|
||||
seaweed_df = pd.read_csv(path + '/seaweed.csv', sep='@', encoding='UTF-8')
|
||||
if pd.notna(city):
|
||||
seaweed_df = seaweed_df[seaweed_df['city'] == city].copy()
|
||||
seaweed_df = seaweed_df.reset_index()
|
||||
seaweed_df = seaweed_df.drop(columns=['index'])
|
||||
|
||||
actions = list()
|
||||
with ThreadPoolExecutor(max_workers=30) as pool:
|
||||
|
||||
@@ -61,6 +61,7 @@ def sync(city=None):
|
||||
if pd.notna(city):
|
||||
seaweed_df = seaweed_df[seaweed_df['city'] == city].copy()
|
||||
seaweed_df = seaweed_df.reset_index()
|
||||
seaweed_df = seaweed_df.drop(columns=['index'])
|
||||
|
||||
def find_around_price_item(index, item):
|
||||
if index % 1000 == 0:
|
||||
|
||||
@@ -62,6 +62,7 @@ def sync(city=None):
|
||||
if pd.notna(city):
|
||||
seaweed_df = seaweed_df[seaweed_df['city'] == city].copy()
|
||||
seaweed_df = seaweed_df.reset_index()
|
||||
seaweed_df = seaweed_df.drop(columns=['index'])
|
||||
|
||||
# 加载库中均价数据
|
||||
query_sql = "SELECT city, region, name, avg_price FROM community_summary "
|
||||
|
||||
Reference in New Issue
Block a user