户均总价逻辑修改
This commit is contained in:
@@ -65,10 +65,10 @@ def sync(city=None):
|
||||
if (curr_city + curr_region + curr_name) in avg_price_map:
|
||||
avg_price = avg_price_map[curr_city + curr_region + curr_name]
|
||||
if pd.notna(avg_price):
|
||||
min_avg_price = 0.8 * avg_price
|
||||
max_avg_rice = 1.2 * avg_price
|
||||
total_price = commutils.get_total_price(curr_city, curr_region, names, day_before=366,
|
||||
min_avg_price=min_avg_price, max_avg_price=max_avg_rice)
|
||||
# 由于覆盖率较低,暂不过滤
|
||||
# min_avg_price = 0.8 * avg_price
|
||||
# max_avg_rice = 1.2 * avg_price
|
||||
total_price = commutils.get_total_price(curr_city, curr_region, names, day_before=366)
|
||||
seaweed_df.loc[index, 'total_price'] = total_price
|
||||
|
||||
for index, item in seaweed_df.iterrows():
|
||||
|
||||
@@ -30,10 +30,10 @@ with DAG(
|
||||
# task_id='trade_dag',
|
||||
# bash_command='python /opt/airflow/dags/repo/dags/business/business/community/trade.py {{dag_run.conf["type"] if "type" in dag_run.conf}}',
|
||||
# )
|
||||
# t6 = BashOperator(
|
||||
# task_id='total_price_dag',
|
||||
# bash_command='python /opt/airflow/dags/repo/dags/business/business/community/total_price.py {{dag_run.conf["type"] if "type" in dag_run.conf}}',
|
||||
# )
|
||||
t6 = BashOperator(
|
||||
task_id='total_price_dag',
|
||||
bash_command='python /opt/airflow/dags/repo/dags/business/business/community/total_price.py {{dag_run.conf["type"] if "type" in dag_run.conf}}',
|
||||
)
|
||||
# t7 = BashOperator(
|
||||
# task_id='traffic_dag',
|
||||
# bash_command='python /opt/airflow/dags/repo/dags/business/business/community/traffic.py {{dag_run.conf["type"] if "type" in dag_run.conf}}',
|
||||
@@ -50,14 +50,14 @@ with DAG(
|
||||
# task_id='relative_price_ranking_dag',
|
||||
# bash_command='python /opt/airflow/dags/repo/dags/business/business/community/relative_price_ranking.py {{dag_run.conf["type"] if "type" in dag_run.conf}}',
|
||||
# )
|
||||
t11 = BashOperator(
|
||||
task_id='consumption_dag',
|
||||
bash_command='python /opt/airflow/dags/repo/dags/business/business/community/consumption.py {{dag_run.conf["type"] if "type" in dag_run.conf}}',
|
||||
)
|
||||
# t11 = BashOperator(
|
||||
# task_id='consumption_dag',
|
||||
# bash_command='python /opt/airflow/dags/repo/dags/business/business/community/consumption.py {{dag_run.conf["type"] if "type" in dag_run.conf}}',
|
||||
# )
|
||||
# t12 = BashOperator(
|
||||
# task_id='price_rating_dag',
|
||||
# bash_command='python /opt/airflow/dags/repo/dags/business/business/community/price_rating.py {{dag_run.conf["type"] if "type" in dag_run.conf}}',
|
||||
# )
|
||||
|
||||
t11
|
||||
t6
|
||||
# t1 >> t2 >> t3 >> t4 >> t5 >> t6 >> t7 >> t8 >> t9 >> t10 >> t11 >> t12
|
||||
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
goojia_utils
|
||||
nextcloud-api-wrapper
|
||||
elasticsearch==7.11.0
|
||||
scikit-learn==0.24.2
|
||||
goojia_utils
|
||||
|
||||
Reference in New Issue
Block a user