20241011
This commit is contained in:
1 parent
31482fb2f5
commit
4455c45565
2 files changed
+211
-132
No files matched your search
+97
-102
@@ -853,26 +853,10 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 29,
|
||||
"execution_count": null,
|
||||
"id": "096e2b97-b83c-46bb-a070-c816e47da331",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-10-10T04:16:54.343310Z",
|
||||
"iopub.status.busy": "2024-10-10T04:16:54.342554Z",
|
||||
"iopub.status.idle": "2024-10-10T04:16:54.374304Z",
|
||||
"shell.execute_reply": "2024-10-10T04:16:54.373814Z",
|
||||
"shell.execute_reply.started": "2024-10-10T04:16:54.343239Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"ok\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import openpyxl\n",
|
||||
"import json\n",
|
||||
@@ -980,17 +964,9 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 34,
|
||||
"execution_count": null,
|
||||
"id": "808e65e9-a9e3-44ea-9c0b-359375dceb3d",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-10-10T04:19:58.591580Z",
|
||||
"iopub.status.busy": "2024-10-10T04:19:58.591086Z",
|
||||
"iopub.status.idle": "2024-10-10T04:19:58.613839Z",
|
||||
"shell.execute_reply": "2024-10-10T04:19:58.613230Z",
|
||||
"shell.execute_reply.started": "2024-10-10T04:19:58.591535Z"
|
||||
}
|
||||
},
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import json\n",
|
||||
@@ -1067,30 +1043,10 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 31,
|
||||
"execution_count": null,
|
||||
"id": "47f53bdf-ac6a-44f1-9f5f-852eb2d61127",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-10-10T04:17:31.723532Z",
|
||||
"iopub.status.busy": "2024-10-10T04:17:31.722782Z",
|
||||
"iopub.status.idle": "2024-10-10T04:17:31.746149Z",
|
||||
"shell.execute_reply": "2024-10-10T04:17:31.745576Z",
|
||||
"shell.execute_reply.started": "2024-10-10T04:17:31.723459Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"15542678894\n",
|
||||
"18562090935\n",
|
||||
"16688150490\n",
|
||||
"13181954355\n",
|
||||
"13381366350\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import json\n",
|
||||
"import csv\n",
|
||||
@@ -1153,47 +1109,10 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 33,
|
||||
"execution_count": null,
|
||||
"id": "c633a37c-0f0e-4b81-83cb-a9fa49efbe36",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-10-10T04:18:31.164865Z",
|
||||
"iopub.status.busy": "2024-10-10T04:18:31.164336Z",
|
||||
"iopub.status.idle": "2024-10-10T04:18:31.173833Z",
|
||||
"shell.execute_reply": "2024-10-10T04:18:31.172840Z",
|
||||
"shell.execute_reply.started": "2024-10-10T04:18:31.164818Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"1 188 张世玉\n",
|
||||
"2 37 孙傲\n",
|
||||
"3 4 戴玮鹏\n",
|
||||
"4 22 刘子童\n",
|
||||
"5 52 李国欣\n",
|
||||
"6 30 彭如旭\n",
|
||||
"7 53 师立军\n",
|
||||
"8 55 王瑞林\n",
|
||||
"9 196 廉鹤\n",
|
||||
"10 76 李春艳\n",
|
||||
"11 26 沈妍\n",
|
||||
"12 9 李霞\n",
|
||||
"13 70 张双星\n",
|
||||
"14 69 许晓东\n",
|
||||
"15 3 余永姝\n",
|
||||
"16 193 陈猛\n",
|
||||
"17 36 牟宝磊\n",
|
||||
"18 77 黄钰苹\n",
|
||||
"19 71 吕晟琨\n",
|
||||
"20 73 龚屹鹏\n",
|
||||
"21 35 王思瑶\n",
|
||||
"22 201 常鹏兵\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import json\n",
|
||||
"import csv\n",
|
||||
@@ -1214,17 +1133,9 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 32,
|
||||
"execution_count": null,
|
||||
"id": "3f68bad7-e2ba-47e1-9ae0-08fce2ad79d1",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-10-10T04:18:20.092613Z",
|
||||
"iopub.status.busy": "2024-10-10T04:18:20.092142Z",
|
||||
"iopub.status.idle": "2024-10-10T04:18:20.099516Z",
|
||||
"shell.execute_reply": "2024-10-10T04:18:20.098866Z",
|
||||
"shell.execute_reply.started": "2024-10-10T04:18:20.092588Z"
|
||||
}
|
||||
},
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import json\n",
|
||||
@@ -1264,6 +1175,90 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 45,
|
||||
"id": "5cb11459-4719-4cbf-9735-510436b8bd49",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-10-11T09:20:31.256635Z",
|
||||
"iopub.status.busy": "2024-10-11T09:20:31.255869Z",
|
||||
"iopub.status.idle": "2024-10-11T09:20:31.299121Z",
|
||||
"shell.execute_reply": "2024-10-11T09:20:31.298616Z",
|
||||
"shell.execute_reply.started": "2024-10-11T09:20:31.256566Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"ok\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import json\n",
|
||||
"import openpyxl\n",
|
||||
"\n",
|
||||
"items = ['lung','grip','flexion','jump','pushup','situp','balance','reaction','step']\n",
|
||||
"bmi = ['height','weight']\n",
|
||||
"title = ['编号','姓名','性别','单位/部门','身高','体重','bmi','肺活量','','握力','','坐位体前屈','','纵跳','','俯卧撑','','一分钟仰卧起坐','','单脚站立','','选择反应时','','台阶指数']\n",
|
||||
"\n",
|
||||
"filename = 'data/result_东营工程设计院2024.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl)\n",
|
||||
"\n",
|
||||
"list1 = []\n",
|
||||
"for k, v in dict1.items(): #print(k,dict2[str(k)]['name'])\n",
|
||||
" list2 = []\n",
|
||||
" list2.append(str(k).rjust(5,'0'))\n",
|
||||
" list2.append(dict1[k]['name']) \n",
|
||||
" list2.append(dict1[k]['sex'])\n",
|
||||
" list2.append(dict1[k]['unit'])\n",
|
||||
" i = 0\n",
|
||||
" if 'bmi' in dict1[k].keys():\n",
|
||||
" list2.append(dict1[k]['height']['成绩'])\n",
|
||||
" list2.append(dict1[k]['weight']['成绩'])\n",
|
||||
" list2.append(dict1[k]['bmi']['score'])\n",
|
||||
" i+=1\n",
|
||||
" else:\n",
|
||||
" list2.append('') \n",
|
||||
" list2.append('') \n",
|
||||
" list2.append('') \n",
|
||||
" \n",
|
||||
" \n",
|
||||
" for item in items:\n",
|
||||
" if item in dict1[k].keys():\n",
|
||||
" list2.append(dict1[k][item]['成绩'])\n",
|
||||
" list2.append(dict1[k][item]['score']) \n",
|
||||
" i+=1\n",
|
||||
" elif item =='name':\n",
|
||||
" list2.append(dict1[k][item])\n",
|
||||
" else:\n",
|
||||
" list2.append('') \n",
|
||||
" list2.append('') \n",
|
||||
" if i>2:\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",
|
||||
" \n",
|
||||
"wb.save(filename)\n",
|
||||
"print('ok') "
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "b089745c-504b-4593-a6be-5d1da1321c95",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
|
||||
Reference in new issue
Block a user