diff --git a/体测单位/安庆石化.ipynb b/体测单位/安庆石化.ipynb index 9389df6..597ab59 100644 --- a/体测单位/安庆石化.ipynb +++ b/体测单位/安庆石化.ipynb @@ -1252,15 +1252,15 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 24, "id": "dcdd18b3-d7b7-49b1-b148-c2ea9a7799ff", "metadata": { "execution": { - "iopub.execute_input": "2023-10-18T04:52:32.821254Z", - "iopub.status.busy": "2023-10-18T04:52:32.820749Z", - "iopub.status.idle": "2023-10-18T04:52:32.885978Z", - "shell.execute_reply": "2023-10-18T04:52:32.885231Z", - "shell.execute_reply.started": "2023-10-18T04:52:32.821208Z" + "iopub.execute_input": "2023-10-23T01:47:20.637431Z", + "iopub.status.busy": "2023-10-23T01:47:20.637008Z", + "iopub.status.idle": "2023-10-23T01:47:20.684289Z", + "shell.execute_reply": "2023-10-23T01:47:20.683177Z", + "shell.execute_reply.started": "2023-10-23T01:47:20.637394Z" }, "tags": [] }, @@ -1286,7 +1286,7 @@ "wj_dm = {'psy_0556_sh':0,'tcm_0556_sh':1,'spine_0556_sh':2}\n", "list1 = []\n", "re_ta = {}\n", - "filename = 'data/Survey_20231018.csv'\n", + "filename = 'data/Survey_20231023.csv'\n", "with open(filename,'r',newline='') as csv_file:\n", " fl = csv.reader(csv_file,delimiter=',')\n", " header = next(fl) \n", @@ -1340,15 +1340,15 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 25, "id": "ea4fffc4-3c6e-4f85-819f-52f969e04dd7", "metadata": { "execution": { - "iopub.execute_input": "2023-10-18T05:02:18.718756Z", - "iopub.status.busy": "2023-10-18T05:02:18.717923Z", - "iopub.status.idle": "2023-10-18T05:02:18.745164Z", - "shell.execute_reply": "2023-10-18T05:02:18.743072Z", - "shell.execute_reply.started": "2023-10-18T05:02:18.718679Z" + "iopub.execute_input": "2023-10-23T01:48:05.387619Z", + "iopub.status.busy": "2023-10-23T01:48:05.387331Z", + "iopub.status.idle": "2023-10-23T01:48:05.409370Z", + "shell.execute_reply": "2023-10-23T01:48:05.407170Z", + "shell.execute_reply.started": "2023-10-23T01:48:05.387594Z" }, "tags": [] }, @@ -1406,7 +1406,34 @@ "id": "37bf232e-7db1-40a8-b8d6-4a182f839848", "metadata": {}, "outputs": [], - "source": [] + "source": [ + "import json\n", + "import csv\n", + "import openpyxl\n", + "\n", + "filename = 'data/安庆职工健康提升志愿者.json'\n", + "with open(filename,'r') as fl:\n", + " dict1 = json.load(fl) \n", + "\n", + "phone = set()\n", + "phone1 = set()\n", + "for k,v in dict1.items():\n", + " phone.add(v['phone'])\n", + "\n", + "filename = 'data/Survey_20231018.csv'\n", + "with open(filename,'r',newline='') as csv_file:\n", + " fl = csv.reader(csv_file,delimiter=',')\n", + " header = next(fl) \n", + " for line in fl:\n", + " #line = re.sub('[\\r\\n\\f ]{1,}', '', line)\n", + " list1.append(line)\n", + "#print(list1)\n", + "for result in list1:\n", + " if result[2] not in phone:\n", + " phone1.add(result[2])\n", + "for item in phone1:\n", + " print(item)" + ] } ], "metadata": { diff --git a/体测单位/政法委.ipynb b/体测单位/政法委.ipynb index 1856641..5c89846 100644 --- a/体测单位/政法委.ipynb +++ b/体测单位/政法委.ipynb @@ -10,27 +10,12 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "id": "bbba6efc-73cd-4db6-bae7-014724fee731", "metadata": { - "execution": { - "iopub.execute_input": "2023-10-20T09:14:31.635091Z", - "iopub.status.busy": "2023-10-20T09:14:31.634228Z", - "iopub.status.idle": "2023-10-20T09:14:31.688961Z", - "shell.execute_reply": "2023-10-20T09:14:31.687120Z", - "shell.execute_reply.started": "2023-10-20T09:14:31.635013Z" - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "ok\n" - ] - } - ], + "outputs": [], "source": [ "import openpyxl\n", "import json\n", @@ -50,7 +35,7 @@ " dict1['sex'] = sheet.cell(n, 3).value\n", " dict1['birth'] = str(sheet.cell(n,4).value).split(' ')[0]\n", " if sheet.cell(n,5).value is not None:\n", - " dict1['phone'] = sheet.cell(n,5).value\n", + " dict1['phone'] = str(sheet.cell(n,5).value)\n", " \n", " person[code] = dict1\n", "filename = 'data/政法委.json'\n", @@ -69,27 +54,12 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "id": "ce406710-6b7d-4c51-98ec-78883bd3ce5f", "metadata": { - "execution": { - "iopub.execute_input": "2023-10-19T05:29:01.332376Z", - "iopub.status.busy": "2023-10-19T05:29:01.331567Z", - "iopub.status.idle": "2023-10-19T05:29:01.352888Z", - "shell.execute_reply": "2023-10-19T05:29:01.350586Z", - "shell.execute_reply.started": "2023-10-19T05:29:01.332301Z" - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "ok\n" - ] - } - ], + "outputs": [], "source": [ "import json\n", "\n", @@ -122,28 +92,12 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "id": "970e171e-1360-448f-a28c-520ccb8f314a", "metadata": { - "execution": { - "iopub.execute_input": "2023-10-20T09:14:46.683022Z", - "iopub.status.busy": "2023-10-20T09:14:46.681792Z", - "iopub.status.idle": "2023-10-20T09:14:46.726814Z", - "shell.execute_reply": "2023-10-20T09:14:46.724006Z", - "shell.execute_reply.started": "2023-10-20T09:14:46.682951Z" - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "25\n", - "25\n" - ] - } - ], + "outputs": [], "source": [ "import json\n", "import time\n", @@ -201,16 +155,9 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "id": "867ad6b0-9e9d-48bc-a10a-3b9cb6125890", "metadata": { - "execution": { - "iopub.execute_input": "2023-10-20T09:16:05.643852Z", - "iopub.status.busy": "2023-10-20T09:16:05.643571Z", - "iopub.status.idle": "2023-10-20T09:16:05.697130Z", - "shell.execute_reply": "2023-10-20T09:16:05.695645Z", - "shell.execute_reply.started": "2023-10-20T09:16:05.643830Z" - }, "tags": [] }, "outputs": [], @@ -264,27 +211,12 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "id": "def3f47a-24ef-4815-b63b-2a16b79b4c15", "metadata": { - "execution": { - "iopub.execute_input": "2023-10-20T09:07:18.193797Z", - "iopub.status.busy": "2023-10-20T09:07:18.193078Z", - "iopub.status.idle": "2023-10-20T09:07:18.226391Z", - "shell.execute_reply": "2023-10-20T09:07:18.225076Z", - "shell.execute_reply.started": "2023-10-20T09:07:18.193731Z" - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[(496535, 2, 5, 3, '2023-10-20', '2023-10-20 17:00:00'), (496535, 8, 5, 20, '2023-10-20', '2023-10-20 17:00:00'), (496535, 42, 5, 29, '2023-10-20', '2023-10-20 17:00:00'), (496535, 22, 5, 30, '2023-10-20', '2023-10-20 17:00:00'), (496535, 21, 5, 43, '2023-10-20', '2023-10-20 17:00:00'), (496535, 12, 5, 20, '2023-10-20', '2023-10-20 17:00:00'), (496535, 4, 5, 38, '2023-10-20', '2023-10-20 17:00:00'), (496535, 30, 5, 10, '2023-10-20', '2023-10-20 17:00:00'), (496535, 2, 3, -118, '2023-10-20', '2023-10-20 17:00:00')]\n" - ] - } - ], + "outputs": [], "source": [ "import openpyxl\n", "import json\n", @@ -307,10 +239,98 @@ "print(list1)" ] }, + { + "cell_type": "markdown", + "id": "5c72d14d-0f75-41d5-a334-fc16f4a2d275", + "metadata": {}, + "source": [ + "## 统计未参加问卷人员信息" + ] + }, { "cell_type": "code", "execution_count": null, - "id": "67e63f07-3f20-4e0e-9c07-7bf6024eeb4b", + "id": "5b646b5d-c4f6-4d37-9510-30fcbef44855", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "import json\n", + "import csv\n", + "import openpyxl\n", + "\n", + "filename = 'data/政法委.json'\n", + "with open(filename,'r') as fl:\n", + " dict1 = json.load(fl) \n", + "\n", + "phone = set()\n", + "phone1 = set()\n", + "for k,v in dict1.items():\n", + " if 'phone' in v.keys():\n", + " phone.add(v['phone'])\n", + "list1 = []\n", + "filename = 'data/Survey_20231023-1698026051370.csv'\n", + "with open(filename,'r',newline='') as csv_file:\n", + " fl = csv.reader(csv_file,delimiter=',')\n", + " header = next(fl) \n", + " for line in fl:\n", + " #line = re.sub('[\\r\\n\\f ]{1,}', '', line)\n", + " list1.append(line)\n", + "#print(list1)\n", + "for result in list1:\n", + " phone1.add(result[2])\n", + "\n", + "for k, v in dict1.items():\n", + " if 'phone' in v.keys():\n", + " item = str(v['phone'])\n", + " if item not in phone1:\n", + " print(k,v['name'])" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0bc15d3a-e0a4-4089-9891-be3da20660cc", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "import json\n", + "import csv\n", + "import openpyxl\n", + "\n", + "filename = 'data/政法委.json'\n", + "with open(filename,'r') as fl:\n", + " dict1 = json.load(fl) \n", + "\n", + "phone = set()\n", + "phone1 = set()\n", + "for k,v in dict1.items():\n", + " if 'phone' in v.keys():\n", + " phone.add(v['phone'])\n", + "list1 = []\n", + "filename = 'data/Survey_20231023-1698026051370.csv'\n", + "with open(filename,'r',newline='') as csv_file:\n", + " fl = csv.reader(csv_file,delimiter=',')\n", + " header = next(fl) \n", + " for line in fl:\n", + " #line = re.sub('[\\r\\n\\f ]{1,}', '', line)\n", + " list1.append(line)\n", + "#print(list1)\n", + "for result in list1:\n", + " phone1.add(result[2])\n", + "\n", + "for item in phone1:\n", + " if item in phone:\n", + " print(item)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6a81d762-86d8-4adf-a0cb-3506a32aef3f", "metadata": {}, "outputs": [], "source": []