This commit is contained in:
512song committed 2024-06-01 23:17:45 +08:00
1 parent e78f868ca3
commit a00b1f56fc
1 file changed
+76 -29
+76 -29
View File
@@ -10,15 +10,15 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 34, "execution_count": 5,
"id": "ed6c774c-e91d-4f99-9a38-318fade9e937", "id": "ed6c774c-e91d-4f99-9a38-318fade9e937",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2024-05-29T11:14:24.452076Z", "iopub.execute_input": "2024-06-01T08:38:50.009649Z",
"iopub.status.busy": "2024-05-29T11:14:24.451311Z", "iopub.status.busy": "2024-06-01T08:38:50.009121Z",
"iopub.status.idle": "2024-05-29T11:14:24.587987Z", "iopub.status.idle": "2024-06-01T08:38:50.151368Z",
"shell.execute_reply": "2024-05-29T11:14:24.587402Z", "shell.execute_reply": "2024-06-01T08:38:50.150654Z",
"shell.execute_reply.started": "2024-05-29T11:14:24.452004Z" "shell.execute_reply.started": "2024-06-01T08:38:50.009599Z"
} }
}, },
"outputs": [ "outputs": [
@@ -71,15 +71,15 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 35, "execution_count": 44,
"id": "c9430854-6f56-4854-bc6b-d22f812f6715", "id": "c9430854-6f56-4854-bc6b-d22f812f6715",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2024-05-29T11:14:29.628238Z", "iopub.execute_input": "2024-05-31T12:41:21.160561Z",
"iopub.status.busy": "2024-05-29T11:14:29.627485Z", "iopub.status.busy": "2024-05-31T12:41:21.159834Z",
"iopub.status.idle": "2024-05-29T11:14:29.764131Z", "iopub.status.idle": "2024-05-31T12:41:21.433867Z",
"shell.execute_reply": "2024-05-29T11:14:29.763573Z", "shell.execute_reply": "2024-05-31T12:41:21.433333Z",
"shell.execute_reply.started": "2024-05-29T11:14:29.628152Z" "shell.execute_reply.started": "2024-05-31T12:41:21.160496Z"
} }
}, },
"outputs": [], "outputs": [],
@@ -164,15 +164,15 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 36, "execution_count": 8,
"id": "1efe2b78-dd18-4d12-8bc9-058f6f0046c9", "id": "1efe2b78-dd18-4d12-8bc9-058f6f0046c9",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2024-05-29T11:14:46.382358Z", "iopub.execute_input": "2024-06-01T08:40:42.686238Z",
"iopub.status.busy": "2024-05-29T11:14:46.381593Z", "iopub.status.busy": "2024-06-01T08:40:42.685496Z",
"iopub.status.idle": "2024-05-29T11:14:46.412338Z", "iopub.status.idle": "2024-06-01T08:40:42.743042Z",
"shell.execute_reply": "2024-05-29T11:14:46.411811Z", "shell.execute_reply": "2024-06-01T08:40:42.742507Z",
"shell.execute_reply.started": "2024-05-29T11:14:46.382294Z" "shell.execute_reply.started": "2024-06-01T08:40:42.686153Z"
} }
}, },
"outputs": [ "outputs": [
@@ -180,8 +180,8 @@
"name": "stdout", "name": "stdout",
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"237\n", "709\n",
"237\n" "709\n"
] ]
} }
], ],
@@ -204,7 +204,7 @@
"with open(filename,'r') as fl:\n", "with open(filename,'r') as fl:\n",
" dict1 = json.load(fl) \n", " dict1 = json.load(fl) \n",
"\n", "\n",
"filename = 'data/places_result_20240529.csv'\n", "filename = 'data/places_result_20240601.csv'\n",
"with open(filename,'r',newline='') as csv_file:\n", "with open(filename,'r',newline='') as csv_file:\n",
" fl = csv.reader(csv_file,delimiter=',')\n", " fl = csv.reader(csv_file,delimiter=',')\n",
" header = next(fl) \n", " header = next(fl) \n",
@@ -242,15 +242,15 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 37, "execution_count": 9,
"id": "dd6379bf-6a79-48de-b3fb-35e84f192ce2", "id": "dd6379bf-6a79-48de-b3fb-35e84f192ce2",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2024-05-29T11:14:55.494999Z", "iopub.execute_input": "2024-06-01T08:41:07.934988Z",
"iopub.status.busy": "2024-05-29T11:14:55.494275Z", "iopub.status.busy": "2024-06-01T08:41:07.934276Z",
"iopub.status.idle": "2024-05-29T11:14:55.722705Z", "iopub.status.idle": "2024-06-01T08:41:08.095312Z",
"shell.execute_reply": "2024-05-29T11:14:55.722177Z", "shell.execute_reply": "2024-06-01T08:41:08.094771Z",
"shell.execute_reply.started": "2024-05-29T11:14:55.494935Z" "shell.execute_reply.started": "2024-06-01T08:41:07.934919Z"
} }
}, },
"outputs": [], "outputs": [],
@@ -285,7 +285,7 @@
" else:\n", " else:\n",
" list2.append('') \n", " list2.append('') \n",
" list1.append(list2)\n", " list1.append(list2)\n",
"filename = 'data/中安联合20240529.xlsx'\n", "filename = 'data/中安联合20240601.xlsx'\n",
"wb = openpyxl.Workbook()\n", "wb = openpyxl.Workbook()\n",
"sheet = wb.active\n", "sheet = wb.active\n",
"sheet.append(title)\n", "sheet.append(title)\n",
@@ -295,10 +295,57 @@
"wb.save(filename)" "wb.save(filename)"
] ]
}, },
{
"cell_type": "markdown",
"id": "8fa66e4e-c3b7-4c5a-a0ad-90e8b36f195e",
"metadata": {},
"source": [
"## 统计未测试人员名单"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "314f9709-4c13-4f8b-bca6-fc2122a9054e",
"metadata": {
"execution": {
"iopub.execute_input": "2024-06-01T06:44:51.160155Z",
"iopub.status.busy": "2024-06-01T06:44:51.159397Z",
"iopub.status.idle": "2024-06-01T06:44:51.205995Z",
"shell.execute_reply": "2024-06-01T06:44:51.205465Z",
"shell.execute_reply.started": "2024-06-01T06:44:51.160088Z"
}
},
"outputs": [],
"source": [
"import json\n",
"import openpyxl\n",
"\n",
"filename = 'data/result_中安联合.json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl)\n",
"filename = 'data/中安联合.json'\n",
"list1 = []\n",
"with open(filename,'r') as fl:\n",
" dict2 = json.load(fl)\n",
"for k,v in dict2.items():\n",
" if k not in dict1.keys():\n",
" list2 = []\n",
" list2 =[k,v['name'],v['sex'],v['unit'],v['birth']]\n",
" list1.append(list2)\n",
"filename = 'data/中安联合未参加体测人员.xlsx'\n",
"wb = openpyxl.Workbook()\n",
"sheet = wb.active\n",
"#sheet.append(title)\n",
"for row in list1:\n",
" sheet.append(row)\n",
"wb.save(filename) "
]
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"id": "7cb7cde8-0d5a-4b46-a304-10ebd54ea491", "id": "53e0e519-4b61-42c7-9a75-dad453c0ff64",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [] "source": []