diff --git a/Untitled.ipynb b/Untitled.ipynb
new file mode 100644
index 0000000..86a6254
--- /dev/null
+++ b/Untitled.ipynb
@@ -0,0 +1,185 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "id": "9048d286-415f-4a33-be3a-9d7099aa85de",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import pandas as pd\n",
+ "from config_jingbo import *"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "id": "07e338e7-1dd1-417f-b4e2-65d0efc983d6",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "df = pd.read_csv(os.path.join(dataset,'last_update_times.csv'))\n",
+ "df = df.sort_values(by=['warning_date'], ascending=[False])"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "id": "659eec10-f0b8-4d65-b70e-6f07f45291bc",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "y_last_update_time = df[df['feature']=='y']['warning_date'].values[0]\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 49,
+ "id": "31035e6f-36e8-4b17-a14b-f7dd79ae085a",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "
\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " last_update_time | \n",
+ " feature | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 500 | \n",
+ " 2024-11-14 | \n",
+ " lmcads03 lme comdty | \n",
+ "
\n",
+ " \n",
+ " 251 | \n",
+ " 2024-11-14 | \n",
+ " 美国MEH轻原油现货价格(美湾) | \n",
+ "
\n",
+ " \n",
+ " 231 | \n",
+ " 2024-11-14 | \n",
+ " WTI原油Cushing-C1 | \n",
+ "
\n",
+ " \n",
+ " 264 | \n",
+ " 2024-11-14 | \n",
+ " LLS原油现货价格 | \n",
+ "
\n",
+ " \n",
+ " 82 | \n",
+ " 2024-11-14 | \n",
+ " OMAN原油:中质:远期现货DES价:山东(日) | \n",
+ "
\n",
+ " \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ "
\n",
+ " \n",
+ " 83 | \n",
+ " 2023-01-03 | \n",
+ " PVM Dubai EFS/Swap vs ICE First Month Brent | \n",
+ "
\n",
+ " \n",
+ " 91 | \n",
+ " 2022-11-16 | \n",
+ " Brent/迪拜原油升贴水 | \n",
+ "
\n",
+ " \n",
+ " 94 | \n",
+ " 2022-01-31 | \n",
+ " W-B活跃合约价差 | \n",
+ "
\n",
+ " \n",
+ " 95 | \n",
+ " 2022-01-31 | \n",
+ " B-W活跃合约价差 | \n",
+ "
\n",
+ " \n",
+ " 31 | \n",
+ " 2018-10-24 | \n",
+ " 西北欧即期Brent 211利润 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
73 rows × 2 columns
\n",
+ "
"
+ ],
+ "text/plain": [
+ " last_update_time feature\n",
+ "500 2024-11-14 lmcads03 lme comdty\n",
+ "251 2024-11-14 美国MEH轻原油现货价格(美湾)\n",
+ "231 2024-11-14 WTI原油Cushing-C1\n",
+ "264 2024-11-14 LLS原油现货价格\n",
+ "82 2024-11-14 OMAN原油:中质:远期现货DES价:山东(日)\n",
+ ".. ... ...\n",
+ "83 2023-01-03 PVM Dubai EFS/Swap vs ICE First Month Brent\n",
+ "91 2022-11-16 Brent/迪拜原油升贴水\n",
+ "94 2022-01-31 W-B活跃合约价差\n",
+ "95 2022-01-31 B-W活跃合约价差\n",
+ "31 2018-10-24 西北欧即期Brent 211利润\n",
+ "\n",
+ "[73 rows x 2 columns]"
+ ]
+ },
+ "execution_count": 49,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "df[df['warning_date'] 0:
+ content = '原油特征指标预警信息:\n\n'
+ warning_data_df = warning_data_df.sort_values(by='last_update_time',ascending=False)
+ for ds, df in warning_data_df.groupby('last_update_time'):
+ content += f'{ds} \n {df["feature"].to_string(index=False).replace(" ", "")}\n\n'
+ else:
+ logger.info(f'没有需要上传的预警信息')
+ content = '没有需要维护的特征指标'
warning_data['data']['WARNING_DATE'] = y_last_update_time
- warning_data['data']['WARNING_CONTENT'] = warning_data_df.to_string(index=False)
+ warning_data['data']['WARNING_CONTENT'] = content
token = get_head_auth_report()
upload_warning_data(token, warning_data)
logger.info(f'上传预警信息成功')
diff --git a/main_yuanyou.py b/main_yuanyou.py
index 51afe07..e2c6698 100644
--- a/main_yuanyou.py
+++ b/main_yuanyou.py
@@ -45,7 +45,7 @@ def predict_main():
# 读取数据
logger.info('读取本地数据:'+os.path.join(dataset,data_set))
df = getdata(filename=os.path.join(dataset,data_set),y=y,dataset=dataset,add_kdj=add_kdj,is_timefurture=is_timefurture,end_time=end_time) # 原始数据,未处理
-
+
# 更改预测列名称
df.rename(columns={y:'y'},inplace=True)