20230426
This commit is contained in:
1 parent
60cd4d2643
commit
d5af3bcb91
6 files changed
+896
-218
No files matched your search
+51
-42
@@ -656,6 +656,53 @@
|
||||
"print('ok')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "270af334-51d0-4c79-8639-e64fb4bb292a",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### 报告分组更名"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "f0860f3a-9f63-43c9-aa39-3ee5ad8116e3",
|
||||
"metadata": {
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os,sys,shutil\n",
|
||||
"import json\n",
|
||||
"import math\n",
|
||||
"import openpyxl\n",
|
||||
"\n",
|
||||
"filename = 'data/低碳院体测人员信息2023.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl)\n",
|
||||
"\n",
|
||||
"fi_path = 'file/139/2023-03-08'\n",
|
||||
"m_path = 'file/139/new'\n",
|
||||
"old = []\n",
|
||||
"\n",
|
||||
"fl=os.listdir(fi_path)\n",
|
||||
"for fn in fl:\n",
|
||||
" if os.path.isfile(fi_path + '/' + fn):\n",
|
||||
" ofn = int(fn.split('.')[0])\n",
|
||||
" old.append(ofn) \n",
|
||||
"old.sort()\n",
|
||||
"for n in old: \n",
|
||||
" o_name = f'{fi_path}/{n}.pdf'\n",
|
||||
" name = dict1[str(n)]['name']\n",
|
||||
" n_name = f'{m_path}/{str(n).rjust(5,\"0\")}-{name}.pdf'\n",
|
||||
" #print(o_name,n_name)\n",
|
||||
" if not os.path.exists(n_name):\n",
|
||||
" shutil.copyfile(o_name,n_name)\n",
|
||||
" print(n_name)\n",
|
||||
"\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "8c97bf0f-2b01-487d-bd18-200fcbe2c9b3",
|
||||
@@ -666,35 +713,12 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 43,
|
||||
"execution_count": null,
|
||||
"id": "bcc60f36-71aa-4d59-b4dd-55b1f95ef4f3",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2023-03-23T13:10:46.922922Z",
|
||||
"iopub.status.busy": "2023-03-23T13:10:46.922072Z",
|
||||
"iopub.status.idle": "2023-03-23T13:10:46.938257Z",
|
||||
"shell.execute_reply": "2023-03-23T13:10:46.937054Z",
|
||||
"shell.execute_reply.started": "2023-03-23T13:10:46.922881Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"20~24岁平均成绩:1.82分,人数:2人\n",
|
||||
"25~29岁平均成绩:3.0分,人数:13人\n",
|
||||
"30~34岁平均成绩:3.01分,人数:36人\n",
|
||||
"35~39岁平均成绩:3.23分,人数:41人\n",
|
||||
"40~44岁平均成绩:3.05分,人数:55人\n",
|
||||
"45~49岁平均成绩:2.82分,人数:14人\n",
|
||||
"50~54岁平均成绩:2.88分,人数:5人\n",
|
||||
"55~59岁平均成绩:2.14分,人数:5人\n",
|
||||
"60~69岁平均成绩:1.45分,人数:1人\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import json\n",
|
||||
"\n",
|
||||
@@ -726,27 +750,12 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 58,
|
||||
"execution_count": null,
|
||||
"id": "f0624326-7a21-4358-a036-daf03432bc80",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2023-03-23T13:46:30.165738Z",
|
||||
"iopub.status.busy": "2023-03-23T13:46:30.164841Z",
|
||||
"iopub.status.idle": "2023-03-23T13:46:30.207376Z",
|
||||
"shell.execute_reply": "2023-03-23T13:46:30.206332Z",
|
||||
"shell.execute_reply.started": "2023-03-23T13:46:30.165698Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"{'体重': {'总体': [625, 165], '男': [310, 94], '女': [315, 71]}, '肺活量': {'总体': [651, 166], '男': [371, 95], '女': [280, 71]}, '握力': {'总体': [335, 159], '男': [191, 93], '女': [144, 66]}, '坐位体前屈': {'总体': [474, 162], '男': [248, 92], '女': [226, 70]}, '纵跳': {'总体': [515, 164], '男': [276, 94], '女': [239, 70]}, '俯卧撑': {'总体': [322, 85], '男': [322, 85]}, '一分钟仰卧起坐': {'总体': [246, 59], '女': [246, 59]}, '单脚站立': {'总体': [339, 165], '男': [169, 94], '女': [170, 71]}, '选择反应时': {'总体': [562, 164], '男': [313, 93], '女': [249, 71]}, '台阶指数': {'总体': [413, 146], '男': [239, 84], '女': [174, 62]}}\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import json\n",
|
||||
"import openpyxl\n",
|
||||
|
||||
Reference in new issue
Block a user