20250617
This commit is contained in:
1 parent
b424b0f3b6
commit
e9900a895e
3 files changed
+137
-312
No files matched your search
@@ -3,9 +3,7 @@
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b6ce4321-f82a-4d9d-a110-44a23b95970b",
|
||||
"metadata": {
|
||||
"jp-MarkdownHeadingCollapsed": true
|
||||
},
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# 2023年体质检测"
|
||||
]
|
||||
|
||||
+43
-273
@@ -391,16 +391,32 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 30,
|
||||
"id": "d6498431-2103-4d27-bba9-f1669b710361",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-06-17T11:21:43.905654Z",
|
||||
"iopub.status.busy": "2025-06-17T11:21:43.904857Z",
|
||||
"iopub.status.idle": "2025-06-17T11:21:44.018679Z",
|
||||
"shell.execute_reply": "2025-06-17T11:21:44.018190Z",
|
||||
"shell.execute_reply.started": "2025-06-17T11:21:43.905567Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"('345321','2020306','pushup','35','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2019543','pushup','25','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2020251','pushup','30','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2019404','pushup','30','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','3497975','pushup','10','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','3391661','pushup','12','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2020276','pushup','20','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2019920','pushup','15','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','3437943','pushup','10','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2019386','pushup','11','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2020327','pushup','18','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','214326','pushup','24','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2020145','pushup','28','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2020085','pushup','20','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2019116','pushup','22','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2020147','pushup','20','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2019161','pushup','15','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2020242','pushup','18','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2018957','pushup','20','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2019109','pushup','30','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2019182','pushup','22','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','3438918','pushup','15','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2019106','pushup','15','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2018735','pushup','5','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2020493','pushup','6','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2019700','pushup','10','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2019632','pushup','22','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','3418306','pushup','10','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2018851','pushup','10','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2019616','pushup','35','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2019663','pushup','40','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2019586','pushup','40','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','3437940','pushup','16','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2020400','pushup','15','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2019169','pushup','10','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2019665','pushup','21','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','3425485','pushup','15','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','3425493','pushup','22','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2020359','pushup','30','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','3391640','pushup','20','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','3533353','pushup','40','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2018733','pushup','15','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','3497916','pushup','21','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2018895','pushup','21','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','3434772','pushup','15','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','3418271','pushup','30','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2020029','pushup','11','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2020171','pushup','10','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','3497913','pushup','20','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','3391664','pushup','20','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2020504','pushup','15','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','3394991','pushup','20','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2019132','pushup','15','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2020155','pushup','15','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2020086','pushup','18','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','3497933','pushup','35','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','3437961','pushup','11','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','3497935','pushup','20','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2020168','pushup','15','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2018658','pushup','25','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2019168','pushup','25','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2019646','pushup','30','2025-06-16','2025-06-17 19:30:00.000 +0800'),('345321','2018737','pushup','22','Line truncated
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import openpyxl\n",
|
||||
"import json\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"wb = openpyxl.load_workbook('data/手工数据.xlsx',data_only=True)\n",
|
||||
"wb = openpyxl.load_workbook('data/手工数据2.xlsx',data_only=True)\n",
|
||||
"sheet = wb.active\n",
|
||||
"s = ''\n",
|
||||
"list1 = []\n",
|
||||
@@ -866,27 +882,12 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 13,
|
||||
"execution_count": null,
|
||||
"id": "02319955-7fb6-4791-ae45-55b03bdadd54",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-06-09T08:21:54.417984Z",
|
||||
"iopub.status.busy": "2025-06-09T08:21:54.417267Z",
|
||||
"iopub.status.idle": "2025-06-09T08:21:54.455725Z",
|
||||
"shell.execute_reply": "2025-06-09T08:21:54.455117Z",
|
||||
"shell.execute_reply.started": "2025-06-09T08:21:54.417917Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"ok\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os,sys,shutil\n",
|
||||
"import json\n",
|
||||
@@ -1567,26 +1568,10 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 25,
|
||||
"execution_count": null,
|
||||
"id": "46aa847d-e1fe-45bd-85b6-e2d792ec8842",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-06-13T03:27:43.345675Z",
|
||||
"iopub.status.busy": "2025-06-13T03:27:43.344810Z",
|
||||
"iopub.status.idle": "2025-06-13T03:27:43.375331Z",
|
||||
"shell.execute_reply": "2025-06-13T03:27:43.374819Z",
|
||||
"shell.execute_reply.started": "2025-06-13T03:27:43.345586Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"245\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import json\n",
|
||||
"import openpyxl\n",
|
||||
@@ -1661,29 +1646,12 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 26,
|
||||
"execution_count": null,
|
||||
"id": "63edd636-f034-4aa6-8575-63d5cdb84adb",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-06-13T03:27:46.364073Z",
|
||||
"iopub.status.busy": "2025-06-13T03:27:46.363417Z",
|
||||
"iopub.status.idle": "2025-06-13T03:27:46.376251Z",
|
||||
"shell.execute_reply": "2025-06-13T03:27:46.375056Z",
|
||||
"shell.execute_reply.started": "2025-06-13T03:27:46.364014Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"平均成绩:2.8665分,男性:150人\n",
|
||||
"平均成绩:3.3401分,女性:95人\n",
|
||||
"平均成绩:3.0501分,总体:245人\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import json\n",
|
||||
"\n",
|
||||
@@ -1722,32 +1690,12 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 17,
|
||||
"execution_count": null,
|
||||
"id": "1b4a3f02-9b2e-41fc-ac6c-8163907a07f1",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-06-13T03:10:24.343017Z",
|
||||
"iopub.status.busy": "2025-06-13T03:10:24.342314Z",
|
||||
"iopub.status.idle": "2025-06-13T03:10:24.366828Z",
|
||||
"shell.execute_reply": "2025-06-13T03:10:24.366315Z",
|
||||
"shell.execute_reply.started": "2025-06-13T03:10:24.342957Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"0~255分人数:45人,男性:38人,女性:7人\n",
|
||||
"256~332分人数:118人,男性:82人,女性:36人\n",
|
||||
"333~367分人数:52人,男性:24人,女性:28人\n",
|
||||
"368~500分人数:30人,男性:6人,女性:24人\n",
|
||||
"245\n",
|
||||
"ok\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import json\n",
|
||||
"\n",
|
||||
@@ -1793,34 +1741,12 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 18,
|
||||
"execution_count": null,
|
||||
"id": "2d661ca6-6129-4da1-ac25-51d0156babb2",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-06-13T03:11:04.066827Z",
|
||||
"iopub.status.busy": "2025-06-13T03:11:04.066130Z",
|
||||
"iopub.status.idle": "2025-06-13T03:11:04.078917Z",
|
||||
"shell.execute_reply": "2025-06-13T03:11:04.077948Z",
|
||||
"shell.execute_reply.started": "2025-06-13T03:11:04.066766Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"20-24 {'合格': 1, '不合格': 0, '优秀': 0, '良好': 1}\n",
|
||||
"25-29 {'不合格': 3, '合格': 9, '良好': 5}\n",
|
||||
"30-34 {'合格': 7, '不合格': 3, '良好': 3, '优秀': 3}\n",
|
||||
"35-39 {'合格': 8, '不合格': 0, '良好': 5, '优秀': 7}\n",
|
||||
"40-44 {'优秀': 4, '合格': 8, '良好': 2, '不合格': 1}\n",
|
||||
"45-49 {'合格': 3, '良好': 5, '优秀': 7, '不合格': 0}\n",
|
||||
"50-54 {'合格': 0, '良好': 7, '优秀': 1, '不合格': 0}\n",
|
||||
"55-80 {'合格': 0, '优秀': 2, '不合格': 0}\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"nld = [[20,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,80]]\n",
|
||||
"\n",
|
||||
@@ -1860,34 +1786,12 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 19,
|
||||
"execution_count": null,
|
||||
"id": "fc97df37-34ff-4a02-9d26-b5d81b706e46",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-06-13T03:12:54.692628Z",
|
||||
"iopub.status.busy": "2025-06-13T03:12:54.692075Z",
|
||||
"iopub.status.idle": "2025-06-13T03:12:54.709238Z",
|
||||
"shell.execute_reply": "2025-06-13T03:12:54.708365Z",
|
||||
"shell.execute_reply.started": "2025-06-13T03:12:54.692563Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"20-24 {'合格': 5, '不合格': 2, '优秀': 1, '良好': 0}\n",
|
||||
"25-29 {'不合格': 18, '合格': 18, '良好': 4}\n",
|
||||
"30-34 {'合格': 7, '不合格': 5, '良好': 3, '优秀': 0}\n",
|
||||
"35-39 {'合格': 18, '不合格': 5, '良好': 4, '优秀': 2}\n",
|
||||
"40-44 {'优秀': 0, '合格': 12, '良好': 5, '不合格': 3}\n",
|
||||
"45-49 {'合格': 5, '良好': 3, '优秀': 2, '不合格': 2}\n",
|
||||
"50-54 {'合格': 10, '良好': 5, '优秀': 1, '不合格': 2}\n",
|
||||
"55-80 {'合格': 7, '优秀': 0, '不合格': 1}\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"nld = [[20,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,80]]\n",
|
||||
"\n",
|
||||
@@ -1927,34 +1831,12 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 20,
|
||||
"execution_count": null,
|
||||
"id": "dafb86f8-5ee0-4c87-a98f-c7ff0f631fe5",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-06-13T03:13:59.203744Z",
|
||||
"iopub.status.busy": "2025-06-13T03:13:59.202995Z",
|
||||
"iopub.status.idle": "2025-06-13T03:13:59.216251Z",
|
||||
"shell.execute_reply": "2025-06-13T03:13:59.215658Z",
|
||||
"shell.execute_reply.started": "2025-06-13T03:13:59.203674Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"16~24岁平均成绩:2.83分,人数:10人,男性:8人\n",
|
||||
"25~29岁平均成绩:2.74分,人数:57人,男性:40人\n",
|
||||
"30~34岁平均成绩:2.99分,人数:31人,男性:15人\n",
|
||||
"35~39岁平均成绩:3.17分,人数:49人,男性:29人\n",
|
||||
"40~44岁平均成绩:3.16分,人数:35人,男性:20人\n",
|
||||
"45~49岁平均成绩:3.33分,人数:27人,男性:12人\n",
|
||||
"50~54岁平均成绩:3.19分,人数:26人,男性:18人\n",
|
||||
"55~69岁平均成绩:3.1分,人数:10人,男性:8人\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"nld = [[16,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,69]]\n",
|
||||
"\n",
|
||||
@@ -1989,34 +1871,12 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 21,
|
||||
"execution_count": null,
|
||||
"id": "347703a1-501b-4800-bd29-16e94f4a6793",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-06-13T03:15:34.340578Z",
|
||||
"iopub.status.busy": "2025-06-13T03:15:34.340095Z",
|
||||
"iopub.status.idle": "2025-06-13T03:15:34.348781Z",
|
||||
"shell.execute_reply": "2025-06-13T03:15:34.348295Z",
|
||||
"shell.execute_reply.started": "2025-06-13T03:15:34.340549Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"20~24岁平均成绩:2.76分,人数:8人\n",
|
||||
"25~29岁平均成绩:2.65分,人数:40人\n",
|
||||
"30~34岁平均成绩:2.79分,人数:15人\n",
|
||||
"35~39岁平均成绩:2.94分,人数:29人\n",
|
||||
"40~44岁平均成绩:3.0分,人数:20人\n",
|
||||
"45~49岁平均成绩:3.06分,人数:12人\n",
|
||||
"50~54岁平均成绩:3.06分,人数:18人\n",
|
||||
"55~80岁平均成绩:2.86分,人数:8人\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import json\n",
|
||||
"\n",
|
||||
@@ -2051,34 +1911,12 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 22,
|
||||
"execution_count": null,
|
||||
"id": "5900d1c7-2f8c-4dfa-a60e-a577fb90f22d",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-06-13T03:16:41.823699Z",
|
||||
"iopub.status.busy": "2025-06-13T03:16:41.822974Z",
|
||||
"iopub.status.idle": "2025-06-13T03:16:41.834407Z",
|
||||
"shell.execute_reply": "2025-06-13T03:16:41.833439Z",
|
||||
"shell.execute_reply.started": "2025-06-13T03:16:41.823631Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"20~24岁平均成绩:3.1分,人数:2人\n",
|
||||
"25~29岁平均成绩:2.96分,人数:17人\n",
|
||||
"30~34岁平均成绩:3.18分,人数:16人\n",
|
||||
"35~39岁平均成绩:3.51分,人数:20人\n",
|
||||
"40~44岁平均成绩:3.37分,人数:15人\n",
|
||||
"45~49岁平均成绩:3.54分,人数:15人\n",
|
||||
"50~54岁平均成绩:3.5分,人数:8人\n",
|
||||
"55~80岁平均成绩:4.05分,人数:2人\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"nld = [[20,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,80]]\n",
|
||||
"\n",
|
||||
@@ -2111,36 +1949,12 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 23,
|
||||
"execution_count": null,
|
||||
"id": "ad69c45d-3f62-42df-894d-47424e759029",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-06-13T03:17:34.005747Z",
|
||||
"iopub.status.busy": "2025-06-13T03:17:34.004277Z",
|
||||
"iopub.status.idle": "2025-06-13T03:17:34.022395Z",
|
||||
"shell.execute_reply": "2025-06-13T03:17:34.021433Z",
|
||||
"shell.execute_reply.started": "2025-06-13T03:17:34.005659Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"BMI 3.52 245\n",
|
||||
"肺活量 3.83 245\n",
|
||||
"握力 2.15 245\n",
|
||||
"坐位体前屈 2.64 240\n",
|
||||
"纵跳 2.95 243\n",
|
||||
"俯卧撑 3.56 143\n",
|
||||
"一分钟仰卧起坐 4.17 88\n",
|
||||
"单脚站立 2.77 245\n",
|
||||
"选择反应时 3.46 245\n",
|
||||
"台阶指数 2.37 231\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl) \n",
|
||||
@@ -2165,56 +1979,12 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 27,
|
||||
"execution_count": null,
|
||||
"id": "dcf152e7-bbcc-47d1-9c5f-83854db35412",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-06-13T03:27:56.882319Z",
|
||||
"iopub.status.busy": "2025-06-13T03:27:56.881715Z",
|
||||
"iopub.status.idle": "2025-06-13T03:27:56.891628Z",
|
||||
"shell.execute_reply": "2025-06-13T03:27:56.890677Z",
|
||||
"shell.execute_reply.started": "2025-06-13T03:27:56.882261Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"管道工程设计所 2.96 30\n",
|
||||
"勘察与地下工程事业部 2.87 21\n",
|
||||
"电力设计所 3.03 13\n",
|
||||
"注水及水处理工艺设计所 2.98 11\n",
|
||||
"油气工艺设计所 2.81 20\n",
|
||||
"机械设备设计所 3.08 8\n",
|
||||
"集成设计中心 2.78 12\n",
|
||||
"经营管理部 2.44 1\n",
|
||||
"技术发展中心 2.98 6\n",
|
||||
"党群工作部 3.67 1\n",
|
||||
"财务资产部 3.64 5\n",
|
||||
"智能化研究中心 3.29 21\n",
|
||||
"建筑设计所 3.33 14\n",
|
||||
"档案管理中心 3.37 8\n",
|
||||
"综合服务中心 3.04 8\n",
|
||||
"绿色低碳技术研究中心 3.03 8\n",
|
||||
"控制部 3.12 6\n",
|
||||
"党委组织部(人力资源部) 3.11 1\n",
|
||||
"工程监理公司 3.06 6\n",
|
||||
"施工管理部 3.04 5\n",
|
||||
"物资装备管理中心 3.47 4\n",
|
||||
"海洋工程设计所 2.78 9\n",
|
||||
"国际工程管理部 2.89 1\n",
|
||||
"自控通信设计所 3.05 12\n",
|
||||
"法律合规部 3.59 3\n",
|
||||
"工程造价中心 3.04 7\n",
|
||||
"运行管理部 3.0 1\n",
|
||||
"纪检监督部 3.33 1\n",
|
||||
"项目执行部 3.33 1\n",
|
||||
"HSE管理部 3.11 1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl) \n",
|
||||
|
||||
+93
-36
@@ -10,15 +10,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 33,
|
||||
"execution_count": 61,
|
||||
"id": "bbba6efc-73cd-4db6-bae7-014724fee731",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-06-13T10:07:44.495425Z",
|
||||
"iopub.status.busy": "2025-06-13T10:07:44.493555Z",
|
||||
"iopub.status.idle": "2025-06-13T10:07:44.777744Z",
|
||||
"shell.execute_reply": "2025-06-13T10:07:44.777194Z",
|
||||
"shell.execute_reply.started": "2025-06-13T10:07:44.495298Z"
|
||||
"iopub.execute_input": "2025-06-17T10:58:46.889726Z",
|
||||
"iopub.status.busy": "2025-06-17T10:58:46.888982Z",
|
||||
"iopub.status.idle": "2025-06-17T10:58:47.160381Z",
|
||||
"shell.execute_reply": "2025-06-17T10:58:47.159839Z",
|
||||
"shell.execute_reply.started": "2025-06-17T10:58:46.889660Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
@@ -27,7 +27,7 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"ok\n"
|
||||
"1697 ok\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -54,7 +54,7 @@
|
||||
"filename = 'data/宁夏能化人员.json'\n",
|
||||
"with open(filename, 'w') as fl:\n",
|
||||
" json.dump(person, fl, ensure_ascii=False)\n",
|
||||
"print('ok')"
|
||||
"print(len(person),'ok')"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -105,15 +105,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 34,
|
||||
"execution_count": 62,
|
||||
"id": "970e171e-1360-448f-a28c-520ccb8f314a",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-06-13T10:07:57.397108Z",
|
||||
"iopub.status.busy": "2025-06-13T10:07:57.396380Z",
|
||||
"iopub.status.idle": "2025-06-13T10:07:57.473353Z",
|
||||
"shell.execute_reply": "2025-06-13T10:07:57.472766Z",
|
||||
"shell.execute_reply.started": "2025-06-13T10:07:57.397044Z"
|
||||
"iopub.execute_input": "2025-06-17T10:58:52.418420Z",
|
||||
"iopub.status.busy": "2025-06-17T10:58:52.417753Z",
|
||||
"iopub.status.idle": "2025-06-17T10:58:52.531589Z",
|
||||
"shell.execute_reply": "2025-06-17T10:58:52.531031Z",
|
||||
"shell.execute_reply.started": "2025-06-17T10:58:52.418365Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
@@ -122,7 +122,7 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"1131\n"
|
||||
"1690\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -136,7 +136,7 @@
|
||||
"filename = 'data/宁夏能化人员.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl) \n",
|
||||
"filename = 'data/marks_20250613.csv'\n",
|
||||
"filename = 'data/marks_20250617.csv'\n",
|
||||
"re_ta = My.get_result(filename,dict1)\n",
|
||||
"\n",
|
||||
"\n",
|
||||
@@ -156,15 +156,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 35,
|
||||
"execution_count": 63,
|
||||
"id": "0905ad6a-f7e4-43ed-ae29-c4850deb946b",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-06-13T10:08:03.790216Z",
|
||||
"iopub.status.busy": "2025-06-13T10:08:03.789961Z",
|
||||
"iopub.status.idle": "2025-06-13T10:08:03.907343Z",
|
||||
"shell.execute_reply": "2025-06-13T10:08:03.906882Z",
|
||||
"shell.execute_reply.started": "2025-06-13T10:08:03.790193Z"
|
||||
"iopub.execute_input": "2025-06-17T10:59:00.022684Z",
|
||||
"iopub.status.busy": "2025-06-17T10:59:00.022098Z",
|
||||
"iopub.status.idle": "2025-06-17T10:59:00.115280Z",
|
||||
"shell.execute_reply": "2025-06-17T10:59:00.114797Z",
|
||||
"shell.execute_reply.started": "2025-06-17T10:59:00.022633Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
@@ -288,15 +288,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 37,
|
||||
"execution_count": 64,
|
||||
"id": "c4b71b0f-0f0c-4962-a540-611cbab51bfa",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-06-13T10:22:08.044562Z",
|
||||
"iopub.status.busy": "2025-06-13T10:22:08.043982Z",
|
||||
"iopub.status.idle": "2025-06-13T10:22:08.121488Z",
|
||||
"shell.execute_reply": "2025-06-13T10:22:08.120903Z",
|
||||
"shell.execute_reply.started": "2025-06-13T10:22:08.044505Z"
|
||||
"iopub.execute_input": "2025-06-17T10:59:19.218357Z",
|
||||
"iopub.status.busy": "2025-06-17T10:59:19.217982Z",
|
||||
"iopub.status.idle": "2025-06-17T10:59:19.259352Z",
|
||||
"shell.execute_reply": "2025-06-17T10:59:19.258768Z",
|
||||
"shell.execute_reply.started": "2025-06-17T10:59:19.218320Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
@@ -326,7 +326,7 @@
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"filename = 'data/宁夏能化未体测人员(截至20250613).xlsx'\n",
|
||||
"filename = 'data/宁夏能化未体测人员.xlsx'\n",
|
||||
"wb = openpyxl.Workbook()\n",
|
||||
"sheet = wb.active\n",
|
||||
"sheet.append(title)\n",
|
||||
@@ -346,15 +346,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 36,
|
||||
"execution_count": 66,
|
||||
"id": "def3f47a-24ef-4815-b63b-2a16b79b4c15",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-06-13T10:08:30.376056Z",
|
||||
"iopub.status.busy": "2025-06-13T10:08:30.375387Z",
|
||||
"iopub.status.idle": "2025-06-13T10:08:30.403659Z",
|
||||
"shell.execute_reply": "2025-06-13T10:08:30.403187Z",
|
||||
"shell.execute_reply.started": "2025-06-13T10:08:30.376001Z"
|
||||
"iopub.execute_input": "2025-06-17T11:02:38.842412Z",
|
||||
"iopub.status.busy": "2025-06-17T11:02:38.841860Z",
|
||||
"iopub.status.idle": "2025-06-17T11:02:38.879864Z",
|
||||
"shell.execute_reply": "2025-06-17T11:02:38.879320Z",
|
||||
"shell.execute_reply.started": "2025-06-17T11:02:38.842360Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
@@ -392,7 +392,64 @@
|
||||
" list2 = [k,k1,v1['人数']]\n",
|
||||
" list1.append(list2)\n",
|
||||
"\n",
|
||||
"filename = 'data/宁夏能化部门测试情况表(截至20260613).xlsx'\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",
|
||||
" \n",
|
||||
"wb.save(filename)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 65,
|
||||
"id": "61dde8c3-844a-4016-8952-cb726ab5f61d",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-06-17T11:01:30.219475Z",
|
||||
"iopub.status.busy": "2025-06-17T11:01:30.218747Z",
|
||||
"iopub.status.idle": "2025-06-17T11:01:30.259871Z",
|
||||
"shell.execute_reply": "2025-06-17T11:01:30.259320Z",
|
||||
"shell.execute_reply.started": "2025-06-17T11:01:30.219409Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import json\n",
|
||||
"\n",
|
||||
"filename = 'data/result_宁夏能化人员.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl)\n",
|
||||
"\n",
|
||||
"filename = 'data/宁夏能化人员.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict2 = json.load(fl)\n",
|
||||
"\n",
|
||||
"dict3 = {}\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"title =['单位','体测人数']\n",
|
||||
"list1 = []\n",
|
||||
"for k,v in dict2.items():\n",
|
||||
" unit = v['unit']\n",
|
||||
" if unit=='管理部门':\n",
|
||||
" sub_unit = dict2[k]['sub_unit']\n",
|
||||
" else:\n",
|
||||
" sub_unit = unit\n",
|
||||
" dict3.setdefault(unit,{}) \n",
|
||||
" dict3[unit].setdefault(sub_unit,{})\n",
|
||||
" dict3[unit][sub_unit].setdefault('人数',0)\n",
|
||||
" dict3[unit][sub_unit]['人数'] = dict3[unit][sub_unit]['人数'] + 1\n",
|
||||
"\n",
|
||||
"for k, v in dict3.items():\n",
|
||||
" list2 = []\n",
|
||||
" for k1,v1 in v.items():\n",
|
||||
" list2 = [k,k1,v1['人数']]\n",
|
||||
" list1.append(list2)\n",
|
||||
"\n",
|
||||
"filename = 'data/宁夏能化部门人员情况表.xlsx'\n",
|
||||
"wb = openpyxl.Workbook()\n",
|
||||
"sheet = wb.active\n",
|
||||
"sheet.append(title)\n",
|
||||
|
||||
Reference in new issue
Block a user