diff --git a/dags/mt/supply/comm.py b/dags/mt/supply/comm.py index 8bb5858..cb85c12 100644 --- a/dags/mt/supply/comm.py +++ b/dags/mt/supply/comm.py @@ -16,7 +16,6 @@ if not os.path.exists(path): city_df = pd.read_excel('/opt/airflow/dags/repo/dags/mt/supply/data/美团88城市列表.xlsx') cities = city_df['城市列表'].values.tolist() - output_date = sys.argv[1] if len(sys.argv) > 1 else dateutils.format_date(datetime.datetime.now(), '%Y%m') print("输出日期" + output_date) @@ -71,6 +70,7 @@ def format_seaweed(x): seaweed_new_result_df = seaweed_result_df.apply(lambda x: format_seaweed(x), axis=1) +seaweed_new_result_df['_id'] = seaweed_new_result_df['_id'].astype(str) seaweed_new_result_df = seaweed_new_result_df.rename(columns={'_id': 'id', 'mapping_alias': 'alias', 'household_count': 'households', 'estate_charge': 'property_fee', 'cubage_percent' : 'plot_ratio', 'virescence_percent': 'landscaping_ratio', 'estate_type2': 'property_type', 'main_type': 'house_type', 'main_type_area': 'house_area'})