From de5294b2145482f04dab76a2c78addce8e20c730 Mon Sep 17 00:00:00 2001 From: 512song Date: Tue, 19 Sep 2023 18:35:08 +0800 Subject: [PATCH] 20230919 --- 体测单位/天津石化.ipynb | 72 +++++++++++++++++++++++++++++++---------- 1 file changed, 55 insertions(+), 17 deletions(-) diff --git a/体测单位/天津石化.ipynb b/体测单位/天津石化.ipynb index 37acc58..4e222dc 100644 --- a/体测单位/天津石化.ipynb +++ b/体测单位/天津石化.ipynb @@ -1505,12 +1505,27 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 31, "id": "25283932-c03a-4a34-a59d-314fc64d8fbd", "metadata": { + "execution": { + "iopub.execute_input": "2023-09-19T09:55:56.717650Z", + "iopub.status.busy": "2023-09-19T09:55:56.717215Z", + "iopub.status.idle": "2023-09-19T09:55:57.413548Z", + "shell.execute_reply": "2023-09-19T09:55:57.413082Z", + "shell.execute_reply.started": "2023-09-19T09:55:56.717617Z" + }, "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ok\n" + ] + } + ], "source": [ "import openpyxl\n", "import json\n", @@ -1585,12 +1600,28 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 32, "id": "e26b88fc-c75b-4c1e-82ea-5017370afa9b", "metadata": { + "execution": { + "iopub.execute_input": "2023-09-19T09:56:00.774430Z", + "iopub.status.busy": "2023-09-19T09:56:00.774175Z", + "iopub.status.idle": "2023-09-19T09:56:00.815234Z", + "shell.execute_reply": "2023-09-19T09:56:00.814836Z", + "shell.execute_reply.started": "2023-09-19T09:56:00.774414Z" + }, "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "548\n", + "548\n" + ] + } + ], "source": [ "import json\n", "import time\n", @@ -1610,7 +1641,7 @@ "with open(filename,'r') as fl:\n", " dict1 = json.load(fl) \n", "\n", - "filename = 'data/places_result_20230918.csv'\n", + "filename = 'data/places_result_20230919.csv'\n", "with open(filename,'r',newline='') as csv_file:\n", " fl = csv.reader(csv_file,delimiter=',')\n", " header = next(fl) \n", @@ -1649,9 +1680,16 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 33, "id": "0a6ea33d-c112-4ed8-9366-3376e55a5731", "metadata": { + "execution": { + "iopub.execute_input": "2023-09-19T09:56:14.365981Z", + "iopub.status.busy": "2023-09-19T09:56:14.365507Z", + "iopub.status.idle": "2023-09-19T09:56:14.524260Z", + "shell.execute_reply": "2023-09-19T09:56:14.523770Z", + "shell.execute_reply.started": "2023-09-19T09:56:14.365945Z" + }, "tags": [] }, "outputs": [], @@ -1686,7 +1724,7 @@ " else:\n", " list2.append('') \n", " list1.append(list2)\n", - "filename = 'data/天津石化体测情况(截至20230918).xlsx'\n", + "filename = 'data/天津石化体测情况(截至20230919).xlsx'\n", "wb = openpyxl.Workbook()\n", "sheet = wb.active\n", "sheet.append(title)\n", @@ -1706,9 +1744,16 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 39, "id": "589a5d44-605d-41a1-a981-7ec7258305ed", "metadata": { + "execution": { + "iopub.execute_input": "2023-09-19T10:14:32.330635Z", + "iopub.status.busy": "2023-09-19T10:14:32.330164Z", + "iopub.status.idle": "2023-09-19T10:14:32.413959Z", + "shell.execute_reply": "2023-09-19T10:14:32.412831Z", + "shell.execute_reply.started": "2023-09-19T10:14:32.330599Z" + }, "tags": [] }, "outputs": [], @@ -1738,20 +1783,13 @@ "for k,v in dict1.items(): \n", " unit = v['unit']\n", " sub_unit = v['sub_unit']\n", - " dict3[unit]['sub_unit'] = dict3[unit][sub_unit] - 1\n", - "\n", - "list1 = []\n", - "for k,v in dict1.items(): \n", - " unit = v['unit']\n", - " sub_unit = v['sub_unit']\n", " dict3[unit][sub_unit] = dict3[unit][sub_unit] - 1\n", - " \n", "for k, v in dict3.items():\n", " for k1, v1 in v.items():\n", " list2 = [k,k1,v1]\n", " list1.append(list2)\n", "\n", - "filename = 'data/天津部门未测试情况(截至20230918).xlsx'\n", + "filename = 'data/天津部门未测试情况(截至20230919).xlsx'\n", "wb = openpyxl.Workbook()\n", "sheet = wb.active\n", "sheet.append(title)\n", @@ -1764,7 +1802,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1b1c5356-0f90-4124-ba73-2e60b74c55df", + "id": "52680817-304b-44e6-b7d5-74c6f12bbb94", "metadata": {}, "outputs": [], "source": []