diff --git a/up_week_dates.csv b/up_week_dates.csv new file mode 100644 index 0000000..6782268 --- /dev/null +++ b/up_week_dates.csv @@ -0,0 +1,16 @@ +ds,ACCURACY,PREDICT_DATE,CREAT_DATE,HIGH_PRICE_y,LOW_PRICE_y,MIN_PRICE,MAX_PRICE,Ds_Week,Pre_Week +2024-12-02,0.0,2024-12-02,2024-11-29,72.89,71.52,81.17999,81.17999,48,48 +2024-12-03,0.0,2024-12-03,2024-11-29,73.93,71.68,80.79155,80.79155,48,48 +2024-12-04,0.0,2024-12-04,2024-11-29,74.28,72.25,80.650894,80.650894,48,48 +2024-12-05,0.0,2024-12-05,2024-11-29,72.92,71.8,80.298,80.298,48,48 +2024-12-06,0.0,2024-12-06,2024-11-29,72.19,70.85,75.50838,80.264275,48,48 +2024-12-03,1.0,2024-12-03,2024-12-02,73.93,71.68,69.80779,75.83719,48,48 +2024-12-04,1.0,2024-12-04,2024-12-02,74.28,72.25,71.281296,76.24051,48,48 +2024-12-05,1.0,2024-12-05,2024-12-02,72.92,71.8,70.52623,75.95541,48,48 +2024-12-06,1.0,2024-12-06,2024-12-02,72.19,70.85,70.71932,75.99768,48,48 +2024-12-04,0.9432068965517233,2024-12-04,2024-12-03,74.28,72.25,72.36529,75.89061,48,48 +2024-12-05,0.6439196428571465,2024-12-05,2024-12-03,72.92,71.8,72.19881,75.72962,48,48 +2024-12-06,0.04017164179103775,2024-12-06,2024-12-03,72.19,70.85,72.13617,75.97762,48,48 +2024-12-05,0.0,2024-12-05,2024-12-04,72.92,71.8,82.40537,82.40537,48,48 +2024-12-06,0.0,2024-12-06,2024-12-04,72.19,70.85,82.0727,82.0727,48,48 +2024-12-06,0.0,2024-12-06,2024-12-05,72.19,70.85,83.367485,83.367485,48,48 diff --git a/原油价格预测准确率计算.ipynb b/原油价格预测准确率计算.ipynb index e2e9058..3d6a783 100644 --- a/原油价格预测准确率计算.ipynb +++ b/原油价格预测准确率计算.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 43, + "execution_count": 130, "id": "9daadf20-caa6-4b25-901c-6cc3ef563f58", "metadata": {}, "outputs": [ @@ -10,67 +10,35 @@ "name": "stdout", "output_type": "stream", "text": [ - "(135, 32)\n", + "(50, 9)\n", "(20, 4)\n", - "(135, 35)\n", - " ds NHITS Informer LSTM iTransformer TSMixer \\\n", - "0 2024-05-21 83.607803 85.574699 82.902397 86.689003 83.845596 \n", - "1 2024-05-22 83.306198 84.577400 82.204903 86.366203 83.341599 \n", - "2 2024-05-23 82.561203 83.894600 81.447899 85.681198 82.593300 \n", - "3 2024-05-24 82.007896 81.672203 81.100899 84.773598 82.038101 \n", - "4 2024-05-27 82.463600 81.498398 81.599297 85.471298 82.187202 \n", + "(50, 12)\n", + " id PREDICT_DATE CREAT_DATE MIN_PRICE MAX_PRICE HIGH_PRICE_x LOW_PRICE_x \\\n", + "0 1 2024-11-26 2024-11-25 71.071556 76.006900 \n", + "1 2 2024-11-27 2024-11-25 71.003624 75.580560 \n", + "2 3 2024-11-28 2024-11-25 72.083850 76.204260 \n", + "3 4 2024-11-29 2024-11-25 71.329730 75.703950 \n", + "4 5 2024-12-02 2024-11-25 71.720825 76.264275 \n", "\n", - " TSMixerx PatchTST RNN GRU ... quantile_90 \\\n", - "0 85.564499 83.900002 60.229801 82.869698 ... 0.0149 \n", - "1 85.500900 82.637299 60.229698 82.206802 ... 0.0149 \n", - "2 85.219299 82.346603 60.229698 81.471298 ... 0.0149 \n", - "3 83.707901 81.840401 60.229599 81.120201 ... 0.0149 \n", - "4 83.175301 82.142998 60.229698 81.602699 ... 0.0145 \n", + " RIGHT_ROTE ds 序号 LOW_PRICE_y HIGH_PRICE_y \n", + "0 2024-11-26 9.0 71.63 73.80 \n", + "1 2024-11-27 8.0 71.71 72.85 \n", + "2 2024-11-28 7.0 71.85 72.96 \n", + "3 2024-11-29 6.0 71.75 73.34 \n", + "4 2024-12-02 5.0 71.52 72.89 \n", + " id PREDICT_DATE CREAT_DATE MIN_PRICE MAX_PRICE HIGH_PRICE_x \\\n", + "45 46 2024-12-09 2024-12-06 68.894770 73.909450 \n", + "46 47 2024-12-10 2024-12-06 68.845604 73.921120 \n", + "47 48 2024-12-11 2024-12-06 69.181210 73.906260 \n", + "48 49 2024-12-12 2024-12-06 69.075340 73.862946 \n", + "49 50 2024-12-13 2024-12-06 69.076550 74.007740 \n", "\n", - " quantile_10_price quantile_90_price min_within_quantile \\\n", - "0 81.993181 84.114909 82.757301 \n", - "1 80.966342 83.120312 82.173500 \n", - "2 80.432497 82.572265 81.447899 \n", - "3 80.907020 83.059412 81.100899 \n", - "4 81.935165 84.081757 82.010399 \n", - "\n", - " max_within_quantile min_model max_model 序号 lowprice highprice \n", - "0 83.954498 MLPMultivariate DLinear NaN NaN NaN \n", - "1 83.068497 MLPMultivariate NLinear NaN NaN NaN \n", - "2 82.452904 LSTM TiDE NaN NaN NaN \n", - "3 82.933502 LSTM DeepNPTS NaN NaN NaN \n", - "4 83.266098 DLinear TFT NaN NaN NaN \n", - "\n", - "[5 rows x 35 columns]\n", - " ds NHITS Informer LSTM iTransformer TSMixer \\\n", - "130 2024-12-03 72.612854 73.548740 73.456590 73.261700 72.531740 \n", - "131 2024-12-04 73.003940 73.408714 73.738144 73.359000 72.759056 \n", - "132 2024-12-05 72.435104 73.837450 73.900570 73.456290 72.775955 \n", - "133 2024-12-06 71.915250 73.683400 73.801330 73.549644 72.517870 \n", - "134 2024-12-09 72.446610 73.003040 74.081820 73.970030 72.687225 \n", - "\n", - " TSMixerx PatchTST RNN GRU ... quantile_90 \\\n", - "130 72.424950 73.314370 62.063490 73.14000 ... NaN \n", - "131 71.986694 74.242960 63.026990 73.08031 ... NaN \n", - "132 72.056160 73.494240 62.319950 73.15901 ... NaN \n", - "133 71.949066 73.083786 62.659557 73.37916 ... NaN \n", - "134 71.930230 72.724205 63.025295 73.40915 ... NaN \n", - "\n", - " quantile_10_price quantile_90_price min_within_quantile \\\n", - "130 NaN NaN 72.386850 \n", - "131 NaN NaN 72.940490 \n", - "132 NaN NaN 73.387985 \n", - "133 NaN NaN 73.056526 \n", - "134 NaN NaN 73.581210 \n", - "\n", - " max_within_quantile min_model max_model 序号 lowprice highprice \n", - "130 73.48625 TCN FEDformer 4.0 71.68 73.93 \n", - "131 73.58921 TCN FEDformer 3.0 72.25 74.28 \n", - "132 73.36786 TCN FEDformer 2.0 71.80 72.92 \n", - "133 73.30574 TCN FEDformer 1.0 70.85 72.19 \n", - "134 73.06101 TCN FEDformer NaN NaN NaN \n", - "\n", - "[5 rows x 35 columns]\n" + " LOW_PRICE_x RIGHT_ROTE ds 序号 LOW_PRICE_y HIGH_PRICE_y \n", + "45 2024-12-09 NaN NaN NaN \n", + "46 2024-12-10 NaN NaN NaN \n", + "47 2024-12-11 NaN NaN NaN \n", + "48 2024-12-12 NaN NaN NaN \n", + "49 2024-12-13 NaN NaN NaN \n" ] } ], @@ -82,20 +50,27 @@ "# 预测价格数据\n", "dbfilename = os.path.join(r'D:\\code\\PriceForecast\\yuanyoudataset','jbsh_yuanyou.db')\n", "conn = sqlite3.connect(dbfilename)\n", - "query = 'SELECT * FROM testandpredict_groupby'\n", + "query = 'SELECT * FROM accuracy'\n", "df1 = pd.read_sql_query(query, conn)\n", - "df1['ds'] = pd.to_datetime(df1['ds'])\n", + "df1['ds'] = df1['PREDICT_DATE']\n", "conn.close()\n", "print(df1.shape)\n", + "\n", + "\n", + "\n", + "\n", "# 最高最低价\n", "xlsfilename = os.path.join(r'D:\\code\\PriceForecast\\yuanyoudataset','数据项下载.xls')\n", "df2 = pd.read_excel(xlsfilename)[5:]\n", - "df2 = df2.rename(columns = {'数据项名称':'ds','布伦特最低价':'lowprice','布伦特最高价':'highprice'})\n", - "df2['ds'] = pd.to_datetime(df2['ds'])\n", - "\n", + "df2 = df2.rename(columns = {'数据项名称':'ds','布伦特最低价':'LOW_PRICE','布伦特最高价':'HIGH_PRICE'})\n", "print(df2.shape)\n", - "df = pd.merge(df1,df2,on='ds',how='outer')\n", "\n", + "\n", + "\n", + "df = pd.merge(df1,df2,on=['ds'],how='left')\n", + "\n", + "df['ds'] = pd.to_datetime(df['ds'])\n", + "df['PREDICT_DATE'] = pd.to_datetime(df['PREDICT_DATE'])\n", "df = df.reindex()\n", "\n", "print(df.shape)\n", @@ -112,16 +87,1001 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 131, "id": "e51c3fd0-6bff-45de-b8b6-971e7986c7a7", "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " ds ACCURACY HIGH_PRICE_y LOW_PRICE_y MIN_PRICE MAX_PRICE\n", + "0 2024-11-26 1.000000 73.80 71.63 71.071556 76.006900\n", + "1 2024-11-27 1.000000 72.85 71.71 71.003624 75.580560\n", + "2 2024-11-28 0.789324 72.96 71.85 72.083850 76.204260\n", + "3 2024-11-29 1.000000 73.34 71.75 71.329730 75.703950\n", + "4 2024-12-02 0.853412 72.89 71.52 71.720825 76.264275\n", + "5 2024-11-27 0.606873 72.85 71.71 72.158165 76.173650\n", + "6 2024-11-28 0.802144 72.96 71.85 72.069620 76.447000\n", + "7 2024-11-29 0.608239 73.34 71.75 72.372900 76.082910\n", + "8 2024-12-02 0.457007 72.89 71.52 72.263900 76.198685\n", + "9 2024-12-03 0.758302 73.93 71.68 72.223820 76.041725\n", + "10 2024-11-28 1.000000 72.96 71.85 70.709750 75.208030\n", + "11 2024-11-29 1.000000 73.34 71.75 69.923110 75.423775\n", + "12 2024-12-02 1.000000 72.89 71.52 70.810356 75.786860\n", + "13 2024-12-03 1.000000 73.93 71.68 70.814430 75.791115\n", + "14 2024-12-04 1.000000 74.28 72.25 70.476650 75.623730\n", + "15 2024-11-29 1.000000 73.34 71.75 70.432760 75.480620\n", + "16 2024-12-02 1.000000 72.89 71.52 69.651825 75.270940\n", + "17 2024-12-03 1.000000 73.93 71.68 70.536285 75.826430\n", + "18 2024-12-04 1.000000 74.28 72.25 70.568340 75.770290\n", + "19 2024-12-05 1.000000 72.92 71.80 70.222640 76.113310\n", + "20 2024-12-02 0.000000 72.89 71.52 81.179990 81.179990\n", + "21 2024-12-03 0.000000 73.93 71.68 80.791550 80.791550\n", + "22 2024-12-04 0.000000 74.28 72.25 80.650894 80.650894\n", + "23 2024-12-05 0.000000 72.92 71.80 80.298000 80.298000\n", + "24 2024-12-06 0.000000 72.19 70.85 75.508380 80.264275\n", + "25 2024-12-03 1.000000 73.93 71.68 69.807790 75.837190\n", + "26 2024-12-04 1.000000 74.28 72.25 71.281296 76.240510\n", + "27 2024-12-05 1.000000 72.92 71.80 70.526230 75.955410\n", + "28 2024-12-06 1.000000 72.19 70.85 70.719320 75.997680\n", + "29 2024-12-09 0.000000 NaN NaN 71.642590 75.828636\n", + "30 2024-12-04 0.943207 74.28 72.25 72.365290 75.890610\n", + "31 2024-12-05 0.643920 72.92 71.80 72.198810 75.729620\n", + "32 2024-12-06 0.040172 72.19 70.85 72.136170 75.977620\n", + "33 2024-12-09 0.000000 NaN NaN 72.165790 75.880104\n", + "34 2024-12-10 0.000000 NaN NaN 72.000620 75.906100\n", + "35 2024-12-05 0.000000 72.92 71.80 82.405370 82.405370\n", + "36 2024-12-06 0.000000 72.19 70.85 82.072700 82.072700\n", + "37 2024-12-09 0.000000 NaN NaN 82.652700 82.652700\n", + "38 2024-12-10 0.000000 NaN NaN 81.920910 81.920910\n", + "39 2024-12-11 0.000000 NaN NaN 81.091270 81.091270\n", + "40 2024-12-06 0.000000 72.19 70.85 83.367485 83.367485\n", + "41 2024-12-09 0.000000 NaN NaN 82.869705 82.869705\n", + "42 2024-12-10 0.000000 NaN NaN 82.580550 82.580550\n", + "43 2024-12-11 0.000000 NaN NaN 82.442154 82.442154\n", + "44 2024-12-12 0.000000 NaN NaN 82.276510 82.276510\n", + "45 2024-12-09 0.000000 NaN NaN 68.894770 73.909450\n", + "46 2024-12-10 0.000000 NaN NaN 68.845604 73.921120\n", + "47 2024-12-11 0.000000 NaN NaN 69.181210 73.906260\n", + "48 2024-12-12 0.000000 NaN NaN 69.075340 73.862946\n", + "49 2024-12-13 0.000000 NaN NaN 69.076550 74.007740\n" + ] + } + ], + "source": [ + "# 定义一个函数来计算准确率\n", + "def calculate_accuracy(row):\n", + " if row['HIGH_PRICE_y'] > row['MIN_PRICE']:\n", + " sorted_prices = sorted([row['LOW_PRICE_y'], row['MIN_PRICE'], row['MAX_PRICE'], row['HIGH_PRICE_y']])\n", + " middle_diff = sorted_prices[2] - sorted_prices[1]\n", + " price_range = row['HIGH_PRICE_y'] - row['LOW_PRICE_y']\n", + " accuracy = middle_diff / price_range\n", + " return accuracy\n", + " else:\n", + " return 0\n", + "\n", + "# 使用 apply 函数来应用计算准确率的函数\n", + "\n", + "columns = ['HIGH_PRICE_y','LOW_PRICE_y','MIN_PRICE','MAX_PRICE']\n", + "df[columns] = df[columns].astype(float)\n", + "df['ACCURACY'] = df.apply(calculate_accuracy, axis=1)\n", + "\n", + "\n", + "# 打印结果\n", + "print(df[['ds','ACCURACY',]+columns])\n", + "\n", + "df = df[['ds','ACCURACY','PREDICT_DATE','CREAT_DATE']+columns]" + ] + }, + { + "cell_type": "code", + "execution_count": 132, + "id": "0f942c69", + "metadata": {}, + "outputs": [], + "source": [ + "import datetime\n", + "# ds 按周取\n", + "df['Ds_Week'] = df['ds'].apply(lambda x: x.strftime('%U'))\n", + "df['Pre_Week'] = df['PREDICT_DATE'].apply(lambda x: x.strftime('%U'))" + ] + }, + { + "cell_type": "code", + "execution_count": 133, + "id": "a7b05510", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
dsACCURACYPREDICT_DATECREAT_DATEHIGH_PRICE_yLOW_PRICE_yMIN_PRICEMAX_PRICEDs_WeekPre_Week
02024-11-261.0000002024-11-262024-11-2573.8071.6371.07155676.0069004747
12024-11-271.0000002024-11-272024-11-2572.8571.7171.00362475.5805604747
22024-11-280.7893242024-11-282024-11-2572.9671.8572.08385076.2042604747
32024-11-291.0000002024-11-292024-11-2573.3471.7571.32973075.7039504747
42024-12-020.8534122024-12-022024-11-2572.8971.5271.72082576.2642754848
52024-11-270.6068732024-11-272024-11-2672.8571.7172.15816576.1736504747
62024-11-280.8021442024-11-282024-11-2672.9671.8572.06962076.4470004747
72024-11-290.6082392024-11-292024-11-2673.3471.7572.37290076.0829104747
82024-12-020.4570072024-12-022024-11-2672.8971.5272.26390076.1986854848
92024-12-030.7583022024-12-032024-11-2673.9371.6872.22382076.0417254848
102024-11-281.0000002024-11-282024-11-2772.9671.8570.70975075.2080304747
112024-11-291.0000002024-11-292024-11-2773.3471.7569.92311075.4237754747
122024-12-021.0000002024-12-022024-11-2772.8971.5270.81035675.7868604848
132024-12-031.0000002024-12-032024-11-2773.9371.6870.81443075.7911154848
142024-12-041.0000002024-12-042024-11-2774.2872.2570.47665075.6237304848
152024-11-291.0000002024-11-292024-11-2873.3471.7570.43276075.4806204747
162024-12-021.0000002024-12-022024-11-2872.8971.5269.65182575.2709404848
172024-12-031.0000002024-12-032024-11-2873.9371.6870.53628575.8264304848
182024-12-041.0000002024-12-042024-11-2874.2872.2570.56834075.7702904848
192024-12-051.0000002024-12-052024-11-2872.9271.8070.22264076.1133104848
202024-12-020.0000002024-12-022024-11-2972.8971.5281.17999081.1799904848
212024-12-030.0000002024-12-032024-11-2973.9371.6880.79155080.7915504848
222024-12-040.0000002024-12-042024-11-2974.2872.2580.65089480.6508944848
232024-12-050.0000002024-12-052024-11-2972.9271.8080.29800080.2980004848
242024-12-060.0000002024-12-062024-11-2972.1970.8575.50838080.2642754848
252024-12-031.0000002024-12-032024-12-0273.9371.6869.80779075.8371904848
262024-12-041.0000002024-12-042024-12-0274.2872.2571.28129676.2405104848
272024-12-051.0000002024-12-052024-12-0272.9271.8070.52623075.9554104848
282024-12-061.0000002024-12-062024-12-0272.1970.8570.71932075.9976804848
292024-12-090.0000002024-12-092024-12-02NaNNaN71.64259075.8286364949
302024-12-040.9432072024-12-042024-12-0374.2872.2572.36529075.8906104848
312024-12-050.6439202024-12-052024-12-0372.9271.8072.19881075.7296204848
322024-12-060.0401722024-12-062024-12-0372.1970.8572.13617075.9776204848
332024-12-090.0000002024-12-092024-12-03NaNNaN72.16579075.8801044949
342024-12-100.0000002024-12-102024-12-03NaNNaN72.00062075.9061004949
352024-12-050.0000002024-12-052024-12-0472.9271.8082.40537082.4053704848
362024-12-060.0000002024-12-062024-12-0472.1970.8582.07270082.0727004848
372024-12-090.0000002024-12-092024-12-04NaNNaN82.65270082.6527004949
382024-12-100.0000002024-12-102024-12-04NaNNaN81.92091081.9209104949
392024-12-110.0000002024-12-112024-12-04NaNNaN81.09127081.0912704949
402024-12-060.0000002024-12-062024-12-0572.1970.8583.36748583.3674854848
412024-12-090.0000002024-12-092024-12-05NaNNaN82.86970582.8697054949
422024-12-100.0000002024-12-102024-12-05NaNNaN82.58055082.5805504949
432024-12-110.0000002024-12-112024-12-05NaNNaN82.44215482.4421544949
442024-12-120.0000002024-12-122024-12-05NaNNaN82.27651082.2765104949
452024-12-090.0000002024-12-092024-12-06NaNNaN68.89477073.9094504949
462024-12-100.0000002024-12-102024-12-06NaNNaN68.84560473.9211204949
472024-12-110.0000002024-12-112024-12-06NaNNaN69.18121073.9062604949
482024-12-120.0000002024-12-122024-12-06NaNNaN69.07534073.8629464949
492024-12-130.0000002024-12-132024-12-06NaNNaN69.07655074.0077404949
\n", + "
" + ], + "text/plain": [ + " ds ACCURACY PREDICT_DATE CREAT_DATE HIGH_PRICE_y LOW_PRICE_y \\\n", + "0 2024-11-26 1.000000 2024-11-26 2024-11-25 73.80 71.63 \n", + "1 2024-11-27 1.000000 2024-11-27 2024-11-25 72.85 71.71 \n", + "2 2024-11-28 0.789324 2024-11-28 2024-11-25 72.96 71.85 \n", + "3 2024-11-29 1.000000 2024-11-29 2024-11-25 73.34 71.75 \n", + "4 2024-12-02 0.853412 2024-12-02 2024-11-25 72.89 71.52 \n", + "5 2024-11-27 0.606873 2024-11-27 2024-11-26 72.85 71.71 \n", + "6 2024-11-28 0.802144 2024-11-28 2024-11-26 72.96 71.85 \n", + "7 2024-11-29 0.608239 2024-11-29 2024-11-26 73.34 71.75 \n", + "8 2024-12-02 0.457007 2024-12-02 2024-11-26 72.89 71.52 \n", + "9 2024-12-03 0.758302 2024-12-03 2024-11-26 73.93 71.68 \n", + "10 2024-11-28 1.000000 2024-11-28 2024-11-27 72.96 71.85 \n", + "11 2024-11-29 1.000000 2024-11-29 2024-11-27 73.34 71.75 \n", + "12 2024-12-02 1.000000 2024-12-02 2024-11-27 72.89 71.52 \n", + "13 2024-12-03 1.000000 2024-12-03 2024-11-27 73.93 71.68 \n", + "14 2024-12-04 1.000000 2024-12-04 2024-11-27 74.28 72.25 \n", + "15 2024-11-29 1.000000 2024-11-29 2024-11-28 73.34 71.75 \n", + "16 2024-12-02 1.000000 2024-12-02 2024-11-28 72.89 71.52 \n", + "17 2024-12-03 1.000000 2024-12-03 2024-11-28 73.93 71.68 \n", + "18 2024-12-04 1.000000 2024-12-04 2024-11-28 74.28 72.25 \n", + "19 2024-12-05 1.000000 2024-12-05 2024-11-28 72.92 71.80 \n", + "20 2024-12-02 0.000000 2024-12-02 2024-11-29 72.89 71.52 \n", + "21 2024-12-03 0.000000 2024-12-03 2024-11-29 73.93 71.68 \n", + "22 2024-12-04 0.000000 2024-12-04 2024-11-29 74.28 72.25 \n", + "23 2024-12-05 0.000000 2024-12-05 2024-11-29 72.92 71.80 \n", + "24 2024-12-06 0.000000 2024-12-06 2024-11-29 72.19 70.85 \n", + "25 2024-12-03 1.000000 2024-12-03 2024-12-02 73.93 71.68 \n", + "26 2024-12-04 1.000000 2024-12-04 2024-12-02 74.28 72.25 \n", + "27 2024-12-05 1.000000 2024-12-05 2024-12-02 72.92 71.80 \n", + "28 2024-12-06 1.000000 2024-12-06 2024-12-02 72.19 70.85 \n", + "29 2024-12-09 0.000000 2024-12-09 2024-12-02 NaN NaN \n", + "30 2024-12-04 0.943207 2024-12-04 2024-12-03 74.28 72.25 \n", + "31 2024-12-05 0.643920 2024-12-05 2024-12-03 72.92 71.80 \n", + "32 2024-12-06 0.040172 2024-12-06 2024-12-03 72.19 70.85 \n", + "33 2024-12-09 0.000000 2024-12-09 2024-12-03 NaN NaN \n", + "34 2024-12-10 0.000000 2024-12-10 2024-12-03 NaN NaN \n", + "35 2024-12-05 0.000000 2024-12-05 2024-12-04 72.92 71.80 \n", + "36 2024-12-06 0.000000 2024-12-06 2024-12-04 72.19 70.85 \n", + "37 2024-12-09 0.000000 2024-12-09 2024-12-04 NaN NaN \n", + "38 2024-12-10 0.000000 2024-12-10 2024-12-04 NaN NaN \n", + "39 2024-12-11 0.000000 2024-12-11 2024-12-04 NaN NaN \n", + "40 2024-12-06 0.000000 2024-12-06 2024-12-05 72.19 70.85 \n", + "41 2024-12-09 0.000000 2024-12-09 2024-12-05 NaN NaN \n", + "42 2024-12-10 0.000000 2024-12-10 2024-12-05 NaN NaN \n", + "43 2024-12-11 0.000000 2024-12-11 2024-12-05 NaN NaN \n", + "44 2024-12-12 0.000000 2024-12-12 2024-12-05 NaN NaN \n", + "45 2024-12-09 0.000000 2024-12-09 2024-12-06 NaN NaN \n", + "46 2024-12-10 0.000000 2024-12-10 2024-12-06 NaN NaN \n", + "47 2024-12-11 0.000000 2024-12-11 2024-12-06 NaN NaN \n", + "48 2024-12-12 0.000000 2024-12-12 2024-12-06 NaN NaN \n", + "49 2024-12-13 0.000000 2024-12-13 2024-12-06 NaN NaN \n", + "\n", + " MIN_PRICE MAX_PRICE Ds_Week Pre_Week \n", + "0 71.071556 76.006900 47 47 \n", + "1 71.003624 75.580560 47 47 \n", + "2 72.083850 76.204260 47 47 \n", + "3 71.329730 75.703950 47 47 \n", + "4 71.720825 76.264275 48 48 \n", + "5 72.158165 76.173650 47 47 \n", + "6 72.069620 76.447000 47 47 \n", + "7 72.372900 76.082910 47 47 \n", + "8 72.263900 76.198685 48 48 \n", + "9 72.223820 76.041725 48 48 \n", + "10 70.709750 75.208030 47 47 \n", + "11 69.923110 75.423775 47 47 \n", + "12 70.810356 75.786860 48 48 \n", + "13 70.814430 75.791115 48 48 \n", + "14 70.476650 75.623730 48 48 \n", + "15 70.432760 75.480620 47 47 \n", + "16 69.651825 75.270940 48 48 \n", + "17 70.536285 75.826430 48 48 \n", + "18 70.568340 75.770290 48 48 \n", + "19 70.222640 76.113310 48 48 \n", + "20 81.179990 81.179990 48 48 \n", + "21 80.791550 80.791550 48 48 \n", + "22 80.650894 80.650894 48 48 \n", + "23 80.298000 80.298000 48 48 \n", + "24 75.508380 80.264275 48 48 \n", + "25 69.807790 75.837190 48 48 \n", + "26 71.281296 76.240510 48 48 \n", + "27 70.526230 75.955410 48 48 \n", + "28 70.719320 75.997680 48 48 \n", + "29 71.642590 75.828636 49 49 \n", + "30 72.365290 75.890610 48 48 \n", + "31 72.198810 75.729620 48 48 \n", + "32 72.136170 75.977620 48 48 \n", + "33 72.165790 75.880104 49 49 \n", + "34 72.000620 75.906100 49 49 \n", + "35 82.405370 82.405370 48 48 \n", + "36 82.072700 82.072700 48 48 \n", + "37 82.652700 82.652700 49 49 \n", + "38 81.920910 81.920910 49 49 \n", + "39 81.091270 81.091270 49 49 \n", + "40 83.367485 83.367485 48 48 \n", + "41 82.869705 82.869705 49 49 \n", + "42 82.580550 82.580550 49 49 \n", + "43 82.442154 82.442154 49 49 \n", + "44 82.276510 82.276510 49 49 \n", + "45 68.894770 73.909450 49 49 \n", + "46 68.845604 73.921120 49 49 \n", + "47 69.181210 73.906260 49 49 \n", + "48 69.075340 73.862946 49 49 \n", + "49 69.076550 74.007740 49 49 " + ] + }, + "execution_count": 133, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df" + ] + }, + { + "cell_type": "code", + "execution_count": 134, + "id": "1374e354", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['2024-11-29', '2024-11-30', '2024-12-01', '2024-12-02', '2024-12-03', '2024-12-04', '2024-12-05', '2024-12-06']\n", + "(15, 10)\n" + ] + } + ], + "source": [ + "# 取结束日期上一周的日期\n", + "endtime = '2024-12-9'\n", + "endtimeweek = datetime.datetime.strptime(endtime, '%Y-%m-%d')\n", + "up_week = endtimeweek - datetime.timedelta(days=endtimeweek.weekday() + 14)\n", + "up_week_dates = [up_week + datetime.timedelta(days=i) for i in range(14)][4:-2]\n", + "up_week_dates = [date.strftime('%Y-%m-%d') for date in up_week_dates]\n", + "print(up_week_dates)\n", + "\n", + "\n", + "df3 = df.copy()\n", + "df3 = df3[df3['CREAT_DATE'].isin(up_week_dates)]\n", + "df3 = df3[df3['PREDICT_DATE'].isin(up_week_dates)]\n", + "print(df3.shape)\n", + "df3.to_csv('up_week_dates.csv',index=False)" + ] + }, + { + "cell_type": "code", + "execution_count": 135, + "id": "8aa47e90", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2024-12-02 00:00:00\n", + "权重: 0.07\n", + "准确率: 0.0\n", + "2024-12-03 00:00:00\n", + "权重: 0.13\n", + "准确率: 7.5\n", + "2024-12-04 00:00:00\n", + "权重: 0.2\n", + "准确率: 9.716034482758616\n", + "2024-12-05 00:00:00\n", + "权重: 0.27\n", + "准确率: 6.1646986607143\n", + "2024-12-06 00:00:00\n", + "权重: 0.33\n", + "准确率: 3.1205149253731137\n", + "26.50124806884603\n" + ] + } + ], + "source": [ + "total = len(df3)\n", + "accuracy_rote = 0\n", + "# for i,group in df3.groupby('CREAT_DATE'):\n", + "for i,group in df3.groupby('ds'):\n", + " print(i)\n", + " print('权重:',round(len(group)/total,2))\n", + " print('准确率:',group['ACCURACY'].sum()/(len(group)/total))\n", + " accuracy_rote += group['ACCURACY'].sum()/(len(group)/total)\n", + "\n", + "print(accuracy_rote)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3e69cacc", + "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "base", "language": "python", "name": "python3" }, diff --git a/测试环境登录接口调试.ipynb b/测试环境登录接口调试.ipynb index 556ba64..446dff5 100644 --- a/测试环境登录接口调试.ipynb +++ b/测试环境登录接口调试.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 8, + "execution_count": 1, "id": "31c0e11d-c87a-4e95-92a0-d1d09625e255", "metadata": {}, "outputs": [], @@ -15,7 +15,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 2, "id": "83c81b9e", "metadata": {}, "outputs": [ @@ -25,7 +25,7 @@ "'http://192.168.100.53:8080/jingbo-dev/api/server/login'" ] }, - "execution_count": 9, + "execution_count": 2, "metadata": {}, "output_type": "execute_result" } @@ -44,7 +44,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 3, "id": "2b330ee3-c006-4ab1-8558-59c51ac8d86f", "metadata": {}, "outputs": [ @@ -59,7 +59,7 @@ " 'funcOperation': '获取token'}" ] }, - "execution_count": 10, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } @@ -70,7 +70,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 4, "id": "dcb6100a-ed2b-4077-a1a9-361c6cb565f9", "metadata": {}, "outputs": [], @@ -87,7 +87,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 5, "id": "22c0c7c4", "metadata": {}, "outputs": [ @@ -95,7 +95,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "{'confirmFlg': False, 'data': {'accessToken': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhcGlfdGVzdCIsInRoIjoiOGE0NTc3ZGJkOTE5Njc1NzU4ZDU3OTk5YTFlODkxZmUiLCJsdCI6ImFwaSIsImlzcyI6IiIsInRtIjoiUEMiLCJleHAiOjE3MzM0MjU1NTYsImp0aSI6IjczNjVlNTZmNTZiYjQ5YjhhNjE3MzhiNDJhMWVmOTJjIn0.pUUzeBqbcHv2B3Z2ZQ6pDdBscWeVGlai3LvVU-Hm03E', 'md5Token': 'f288634c14d5e93fc9c0b7a423a8ba33'}, 'status': True}\n" + "{'confirmFlg': False, 'data': {'accessToken': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhcGlfdGVzdCIsInRoIjoiOGE0NTc3ZGJkOTE5Njc1NzU4ZDU3OTk5YTFlODkxZmUiLCJsdCI6ImFwaSIsImlzcyI6IiIsInRtIjoiUEMiLCJleHAiOjE3MzM3NjQxODAsImp0aSI6IjEzYWRlMTljYzg2OTQ4ODk4YjFiY2FkNTVmODEyZDI3In0.hx0thhOdqnjhFDWkJF0ZdCAK9qwAv5HB15gO7o5mXbY', 'md5Token': '22e1a4c6206d348848cb2fac1ed67312'}, 'status': True}\n" ] } ], @@ -105,7 +105,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 6, "id": "12077ead", "metadata": {}, "outputs": [], @@ -115,7 +115,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 10, "id": "a7ae21d1", "metadata": {}, "outputs": [ @@ -127,17 +127,17 @@ "INFO:my_logger:上传预警信息\n", "预警上传中...\n", "INFO:my_logger:预警上传中...\n", - "token:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhcGlfdGVzdCIsInRoIjoiOGE0NTc3ZGJkOTE5Njc1NzU4ZDU3OTk5YTFlODkxZmUiLCJsdCI6ImFwaSIsImlzcyI6IiIsInRtIjoiUEMiLCJleHAiOjE3MzM0MjU1NTYsImp0aSI6Ijk2ZjJlNDg4NDgzMzQyYThhYmMyYzVhYjg2NGNhNDhhIn0.Vl6wmKDRxPdZANwEEWAQ4wBPbJKC2YWVi0Gm51ZzjE0\n", - "INFO:my_logger:token:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhcGlfdGVzdCIsInRoIjoiOGE0NTc3ZGJkOTE5Njc1NzU4ZDU3OTk5YTFlODkxZmUiLCJsdCI6ImFwaSIsImlzcyI6IiIsInRtIjoiUEMiLCJleHAiOjE3MzM0MjU1NTYsImp0aSI6Ijk2ZjJlNDg4NDgzMzQyYThhYmMyYzVhYjg2NGNhNDhhIn0.Vl6wmKDRxPdZANwEEWAQ4wBPbJKC2YWVi0Gm51ZzjE0\n", - "warning_data:{'funcModule': '原油特征停更预警', 'funcOperation': '原油特征停更预警', 'data': {'WARNING_TYPE_NAME': '特征数据停更预警', 'WARNING_CONTENT': '2024-12-05有34个停更', 'WARNING_DATE': '2024-12-05'}}\n", - "INFO:my_logger:warning_data:{'funcModule': '原油特征停更预警', 'funcOperation': '原油特征停更预警', 'data': {'WARNING_TYPE_NAME': '特征数据停更预警', 'WARNING_CONTENT': '2024-12-05有34个停更', 'WARNING_DATE': '2024-12-05'}}\n" + "token:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhcGlfdGVzdCIsInRoIjoiOGE0NTc3ZGJkOTE5Njc1NzU4ZDU3OTk5YTFlODkxZmUiLCJsdCI6ImFwaSIsImlzcyI6IiIsInRtIjoiUEMiLCJleHAiOjE3MzM3Njg3NjMsImp0aSI6ImEzYTMwMGNmZjRkNzRiYjY5YTFhMWI0ODMzMjYzOWJmIn0.xPmT4E0ckxfNZbcBEsnTzU8zzxij8zvROBpXeTZMn_U\n", + "INFO:my_logger:token:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhcGlfdGVzdCIsInRoIjoiOGE0NTc3ZGJkOTE5Njc1NzU4ZDU3OTk5YTFlODkxZmUiLCJsdCI6ImFwaSIsImlzcyI6IiIsInRtIjoiUEMiLCJleHAiOjE3MzM3Njg3NjMsImp0aSI6ImEzYTMwMGNmZjRkNzRiYjY5YTFhMWI0ODMzMjYzOWJmIn0.xPmT4E0ckxfNZbcBEsnTzU8zzxij8zvROBpXeTZMn_U\n", + "warning_data:{'funcModule': '原油特征停更预警', 'funcOperation': '原油特征停更预警', 'data': {'WARNING_TYPE_NAME': '特征数据停更预警', 'WARNING_CONTENT': '2024-12-09有30个停更', 'WARNING_DATE': '2024-12-09'}}\n", + "INFO:my_logger:warning_data:{'funcModule': '原油特征停更预警', 'funcOperation': '原油特征停更预警', 'data': {'WARNING_TYPE_NAME': '特征数据停更预警', 'WARNING_CONTENT': '2024-12-09有30个停更', 'WARNING_DATE': '2024-12-09'}}\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "{'confirmFlg': False, 'data': {'accessToken': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhcGlfdGVzdCIsInRoIjoiOGE0NTc3ZGJkOTE5Njc1NzU4ZDU3OTk5YTFlODkxZmUiLCJsdCI6ImFwaSIsImlzcyI6IiIsInRtIjoiUEMiLCJleHAiOjE3MzM0MjU1NTYsImp0aSI6Ijk2ZjJlNDg4NDgzMzQyYThhYmMyYzVhYjg2NGNhNDhhIn0.Vl6wmKDRxPdZANwEEWAQ4wBPbJKC2YWVi0Gm51ZzjE0', 'md5Token': '99b49d2d29f44041f46ecd03a3987961'}, 'status': True}\n" + "{'confirmFlg': False, 'data': {'accessToken': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhcGlfdGVzdCIsInRoIjoiOGE0NTc3ZGJkOTE5Njc1NzU4ZDU3OTk5YTFlODkxZmUiLCJsdCI6ImFwaSIsImlzcyI6IiIsInRtIjoiUEMiLCJleHAiOjE3MzM3Njg3NjMsImp0aSI6ImEzYTMwMGNmZjRkNzRiYjY5YTFhMWI0ODMzMjYzOWJmIn0.xPmT4E0ckxfNZbcBEsnTzU8zzxij8zvROBpXeTZMn_U', 'md5Token': '0d22e2eedf2857a4c5ef80a56b4b6569'}, 'status': True}\n" ] }, { @@ -168,7 +168,7 @@ "logger.info(f'上传预警信息')\n", "try:\n", " warning_date = datetime.datetime.now().strftime('%Y-%m-%d')\n", - " content = f'{warning_date}有34个停更'\n", + " content = f'{warning_date}有30个停更'\n", " warning_data['data']['WARNING_DATE'] = warning_date\n", " warning_data['data']['WARNING_CONTENT'] = content\n", " upload_warning_data(warning_data)\n", @@ -176,6 +176,14 @@ "except Exception as e:\n", " logger.error(f'上传预警信息失败:{e}')" ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "54942e1a", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": {