This commit is contained in:
512song committed 2023-04-15 13:16:52 +00:00
1 parent 3099922e08
commit 140873c0bb
2 files changed
+127 -198

No files matched your search

+119 -138
View File
@@ -104,6 +104,73 @@
"print('ok')" "print('ok')"
] ]
}, },
{
"cell_type": "markdown",
"id": "6fc0bfbd-a5cd-4720-bc66-14d74d730fc7",
"metadata": {},
"source": [
"### 获取人员测试成绩(新格式)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4ffa6cd8-98a2-4975-af00-8647a0888bdd",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import json\n",
"import time\n",
"import csv\n",
"\n",
"filename = '../item.json'\n",
"item = {}\n",
"unit = {}\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl) \n",
"for k,v in dict1.items():\n",
" item[k] = v\n",
"\n",
"dict1 = {}\n",
"list1 = []\n",
"#print(\"\\n运动项目信息:\")\n",
"filename = 'data/141.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",
"list2 = []\n",
"re_ta = {}\n",
"for result in list1:\n",
" user = str(result[4])\n",
" m_item = str(result[0]) \n",
" re_ta.setdefault(user,{}) \n",
" re_ta[user]['name'] = str(result[6])\n",
" re_ta[user]['unit'] = str(result[5]) \n",
" item_name = item[m_item]['name']\n",
" re_ta[user].setdefault(item_name,{}) \n",
" score = int(result[1])/item[m_item]['divisor'] \n",
" re_ta[user][item_name]['成绩'] = f'{score} {item[m_item][\"unit\"]}'\n",
" re_ta[user][item_name]['得分'] =result[2]\n",
"for k, v in re_ta.items():\n",
" dict2 = {}\n",
" dict2['code'] = k\n",
" for k1, v1 in v.items():\n",
" dict2[k1] = v1\n",
" list2.append(dict2)\n",
"dict3 = {}\n",
"dict3['result'] = list2\n",
"filename = 'data/result_东营石油工程设计院(new).json'\n",
"with open(filename,'w') as fl:\n",
" json.dump(dict3, fl) \n",
"print('ok')"
]
},
{ {
"cell_type": "markdown", "cell_type": "markdown",
"id": "c4107446-c0c6-4d76-9062-284ff806ec86", "id": "c4107446-c0c6-4d76-9062-284ff806ec86",
@@ -536,31 +603,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 28, "execution_count": null,
"id": "aa32ab25-6cb7-4a1b-87f9-5ec2b11d9715", "id": "aa32ab25-6cb7-4a1b-87f9-5ec2b11d9715",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2023-04-12T13:22:18.338825Z",
"iopub.status.busy": "2023-04-12T13:22:18.337969Z",
"iopub.status.idle": "2023-04-12T13:22:18.406570Z",
"shell.execute_reply": "2023-04-12T13:22:18.405537Z",
"shell.execute_reply.started": "2023-04-12T13:22:18.338784Z"
},
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"0~255分人数:58人,男性:54人,女性:4人\n",
"256~332分人数:149人,男性:96人,女性:53人\n",
"333~367分人数:95人,男性:43人,女性:52人\n",
"368~500分人数:34人,男性:10人,女性:24人\n",
"ok\n"
]
}
],
"source": [ "source": [
"import json\n", "import json\n",
"\n", "\n",
@@ -606,35 +654,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 30, "execution_count": null,
"id": "1759fc30-f390-4ed1-8d48-5eacc050e18f", "id": "1759fc30-f390-4ed1-8d48-5eacc050e18f",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2023-04-12T13:36:32.351702Z",
"iopub.status.busy": "2023-04-12T13:36:32.350823Z",
"iopub.status.idle": "2023-04-12T13:36:32.375360Z",
"shell.execute_reply": "2023-04-12T13:36:32.374336Z",
"shell.execute_reply.started": "2023-04-12T13:36:32.351659Z"
},
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"20-24 {'合格': 9, '良好': 3, '不合格': 6, '优秀': 0}\n",
"25-29 {'不合格': 12, '合格': 20, '优秀': 1, '良好': 5}\n",
"30-34 {'合格': 14, '良好': 8, '不合格': 11, '优秀': 1}\n",
"35-39 {'良好': 7, '优秀': 3, '合格': 16, '不合格': 8}\n",
"40-44 {'良好': 9, '合格': 11, '优秀': 1, '不合格': 4}\n",
"45-49 {'良好': 5, '优秀': 2, '合格': 6, '不合格': 3}\n",
"50-54 {'良好': 3, '合格': 14, '优秀': 2, '不合格': 3}\n",
"55-59 {'不合格': 7, '合格': 6, '优秀': 0, '良好': 2}\n",
"60-69 {'良好': 1}\n"
]
}
],
"source": [ "source": [
"nld = [[20,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,59],[60,69]]\n", "nld = [[20,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,59],[60,69]]\n",
"filename = 'data/result_东营设计院.json'\n", "filename = 'data/result_东营设计院.json'\n",
@@ -674,35 +699,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 31, "execution_count": null,
"id": "b7b44be3-8cf1-48e6-a4a6-adfccdb8c0a9", "id": "b7b44be3-8cf1-48e6-a4a6-adfccdb8c0a9",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2023-04-12T13:38:24.872938Z",
"iopub.status.busy": "2023-04-12T13:38:24.872071Z",
"iopub.status.idle": "2023-04-12T13:38:24.900110Z",
"shell.execute_reply": "2023-04-12T13:38:24.899005Z",
"shell.execute_reply.started": "2023-04-12T13:38:24.872897Z"
},
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"20-24 {'合格': 3, '良好': 4, '不合格': 1, '优秀': 1}\n",
"25-29 {'不合格': 0, '合格': 6, '优秀': 2, '良好': 9}\n",
"30-34 {'合格': 15, '良好': 7, '不合格': 2, '优秀': 3}\n",
"35-39 {'良好': 13, '优秀': 6, '合格': 10, '不合格': 0}\n",
"40-44 {'良好': 10, '合格': 5, '优秀': 6, '不合格': 0}\n",
"45-49 {'良好': 4, '优秀': 3, '合格': 4, '不合格': 0}\n",
"50-54 {'良好': 3, '合格': 9, '优秀': 2, '不合格': 1}\n",
"55-59 {'不合格': 0, '合格': 1, '优秀': 1, '良好': 2}\n",
"60-69 {'良好': 0}\n"
]
}
],
"source": [ "source": [
"nld = [[20,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,59],[60,69]]\n", "nld = [[20,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,59],[60,69]]\n",
"filename = 'data/result_东营设计院.json'\n", "filename = 'data/result_东营设计院.json'\n",
@@ -742,50 +744,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 37, "execution_count": null,
"id": "975bb98b-a00c-4a34-b9a3-fe9975c12641", "id": "975bb98b-a00c-4a34-b9a3-fe9975c12641",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2023-04-12T13:51:18.537293Z",
"iopub.status.busy": "2023-04-12T13:51:18.536443Z",
"iopub.status.idle": "2023-04-12T13:51:18.557426Z",
"shell.execute_reply": "2023-04-12T13:51:18.556451Z",
"shell.execute_reply.started": "2023-04-12T13:51:18.537253Z"
},
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"管道工程设计所 3.19 19\n",
"建筑设计所 3.03 15\n",
"机械设备所 3.31 24\n",
"油气工艺设计所 2.96 18\n",
"工程勘察公司 3.12 33\n",
"水处理及热力工程设计所 2.85 25\n",
"自控通信所 3.13 20\n",
"海洋工程设计所 3.04 26\n",
"电力设计所 3.07 19\n",
"智能化研究中心 3.04 28\n",
"HSE管理部 3.44 1\n",
"项目管理中心 3.1 17\n",
"节能环保工程技术中心 3.1 18\n",
"技术发展中心 2.7 10\n",
"工程监理公司 3.16 7\n",
"工程造价中心 2.94 9\n",
"档案管理中心 3.15 8\n",
"国际工程管理部 3.11 6\n",
"党群工作部 3.78 1\n",
"市场开发部 2.8 7\n",
"综合服务中心 2.96 12\n",
"技术质量部 3.67 2\n",
"财务资产部 2.93 9\n",
"综合管理部 2.94 2\n"
]
}
],
"source": [ "source": [
"with open(filename,'r') as fl:\n", "with open(filename,'r') as fl:\n",
" dict1 = json.load(fl) \n", " dict1 = json.load(fl) \n",
@@ -815,36 +779,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 40, "execution_count": null,
"id": "f51baed5-8d03-4d33-8d68-37ac13f9a47d", "id": "f51baed5-8d03-4d33-8d68-37ac13f9a47d",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2023-04-12T13:59:23.343983Z",
"iopub.status.busy": "2023-04-12T13:59:23.343101Z",
"iopub.status.idle": "2023-04-12T13:59:23.365478Z",
"shell.execute_reply": "2023-04-12T13:59:23.364375Z",
"shell.execute_reply.started": "2023-04-12T13:59:23.343942Z"
},
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"体重 3.53\n",
"肺活量 3.57\n",
"握力 2.15\n",
"坐位体前屈 2.64\n",
"纵跳 2.8\n",
"俯卧撑 3.19\n",
"一分钟仰卧起坐 4.27\n",
"单脚站立 2.94\n",
"选择反应时 3.75\n",
"台阶指数 2.56\n"
]
}
],
"source": [ "source": [
"with open(filename,'r') as fl:\n", "with open(filename,'r') as fl:\n",
" dict1 = json.load(fl) \n", " dict1 = json.load(fl) \n",
@@ -859,10 +799,51 @@
" print(item,round(score/n,2))" " print(item,round(score/n,2))"
] ]
}, },
{
"cell_type": "markdown",
"id": "adb043d9-4e1f-49eb-b051-84e4efbc3c72",
"metadata": {},
"source": [
"### 使用JMESPath查询"
]
},
{
"cell_type": "code",
"execution_count": 70,
"id": "7b148f6d-0d6d-4573-9df3-ea02faab165d",
"metadata": {
"execution": {
"iopub.execute_input": "2023-04-15T12:32:09.317495Z",
"iopub.status.busy": "2023-04-15T12:32:09.316589Z",
"iopub.status.idle": "2023-04-15T12:32:09.333606Z",
"shell.execute_reply": "2023-04-15T12:32:09.332528Z",
"shell.execute_reply.started": "2023-04-15T12:32:09.317454Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[['张东红', '建筑设计所'], ['孙淑华', '建筑设计所'], ['靳永东', '建筑设计所'], ['张浩', '建筑设计所'], ['宁聪聪', '建筑设计所'], ['李磊', '建筑设计所'], ['尚华凯', '建筑设计所'], ['王修龙', '建筑设计所'], ['王剑', '建筑设计所'], ['李天萌', '建筑设计所'], ['崔华强', '建筑设计所'], ['王乙臻', '建筑设计所'], ['刘小燕', '建筑设计所'], ['韦盛', '建筑设计所'], ['张跃', '建筑设计所']]\n"
]
}
],
"source": [
"from jmespath import search\n",
"filename = 'data/result_东营石油工程设计院(new).json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl) \n",
"unit = \"建筑设计所\"\n",
"data = search(\"result[?unit== '建筑设计所'].[name,unit]\",dict1)\n",
"print(data)"
]
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"id": "1617ddd9-b744-48a3-a4d5-1166b16821cb", "id": "c5ef31b6-ceed-4167-bec7-58e92b3698e1",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [] "source": []
+8 -60
View File
@@ -536,27 +536,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 3, "execution_count": null,
"id": "f41e130b-06e5-45ee-bf3d-cc25dfcc653d", "id": "f41e130b-06e5-45ee-bf3d-cc25dfcc653d",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2023-04-12T15:10:55.978394Z",
"iopub.status.busy": "2023-04-12T15:10:55.977541Z",
"iopub.status.idle": "2023-04-12T15:10:56.459998Z",
"shell.execute_reply": "2023-04-12T15:10:56.459027Z",
"shell.execute_reply.started": "2023-04-12T15:10:55.978355Z"
},
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"(\"merge1\",\"郑云香\",\"192\",'{\"Gender\":\"f\",\"Age\":\"O\",\"q1O\":4,\"q2O\":2,\"q3O\":4,\"q4O\":4,\"q5O\":4,\"q6O\":4,\"q7O\":4,\"q8O\":4,\"q9O\":4,\"q10O\":5,\"q11O\":2,\"q12O\":3,\"q13O\":4,\"q14O\":4,\"q15O\":5,\"q16O\":4,\"q17O\":4,\"q18O\":3,\"q19O\":4,\"q20O\":4,\"q21O\":3,\"q22O\":4,\"q23O\":4,\"q24O\":3,\"q25O\":3,\"q26O\":3,\"q27O\":3,\"q28O\":3,\"q29O\":3,\"q30O\":3,\"q1\":4,\"q3\":3,\"q4\":1,\"q5\":4,\"q6\":4,\"q8\":4,\"q10\":4,\"q13\":5,\"q14\":4,\"q15\":4,\"q16\":4,\"q17\":4,\"q18\":5,\"q19\":4,\"q20\":2,\"q22\":3,\"q23\":3,\"q25\":3,\"q26\":4,\"q27\":4,\"q28\":5,\"q29\":3,\"q30\":3,\"q31\":3,\"q32\":3,\"q33\":4,\"q34\":1,\"q35\":1,\"q36\":2,\"q37\":1,\"q38\":3,\"q39\":5,\"q40\":1,\"q41\":2,\"q42\":1,\"q43\":1,\"q44\":4,\"q45\":3,\"q46\":1,\"q47\":2,\"q48\":2,\"q49\":2,\"q50\":3,\"q51\":1,\"q52\":2,\"q53\":1,\"q54\":1,\"q55\":2,\"q56\":2,\"q57\":1,\"q58\":1,\"q59\":1,\"q60\":1,\"qv1\":1,\"qv2\":1,\"qv3\":2,\"qv4\":2,\"qv5\":1,\"qv6\":1,\"qv7\":1,\"qv8\":2,\"qv9\":2,\"qv10\":2,\"qv11\":2,\"qv12\":2,\"qv13\":2,\"qv14\":2,\"qv15\":2,\"qv16\":2,\"qv17\":2,\"qv18\":1,\"qv19\":1,\"qv20\":2,\"qv21\":1,\"qv22\":2,\"qv23\":2,\"qv24\":1,\"qv25\":2,\"qv26\":2}',\"2023-03-28 20:02:00\"),(\"merge1\",\"孙秀兰\",\"190\",'{\"Gender\":\"f\",\"Age\":\"O\",\"q1O\":2,\"q2O\":3,\"q3O\":2,\"q4O\":1,\"q5O\":5,\"q6O\":5,\"q7O\":5,\"q8O\":3,\"q9O\":5,\"q10O\":1,\"q11O\":5,\"q12O\":5,\"q13O\":4,\"q14O\":4,\"q15O\":5,\"q16O\":5,\"q17O\":5,\"q18O\":1,\"q19O\":5,\"q20O\":5,\"q21O\":2,\"q22O\":4,\"q23O\":5,\"q24O\":2,\"q25O\":2,\"q26O\":5,\"q27O\":3,\"q28O\":1,\"q29O\":4,\"q30O\":3,\"q1\":3,\"q3\":3,\"q4\":2,\"q5\":4,\"q6\":4,\"q8\":4,\"q10\":1,\"q13\":1,\"q14\":1,\"q15\":1,\"q16\":3,\"q17\":4,\"q18\":5,\"q19\":5,\"q20\":1,\"q22\":1,\"q23\":2,\"q25\":1,\"q26\":3,\"q27\":1,\"q28\":1,\"q29\":1,\"q30\":2,\"q31\":1,\"q32\":1,\"q33\":1,\"q34\":2,\"q35\":5,\"q36\":1,\"q37\":1,\"q38\":5,\"q39\":1,\"q40\":3,\"q41\":1,\"q42\":3,\"q43\":1,\"q44\":4,\"q45\":1,\"q46\":1,\"q47\":1,\"q48\":3,\"q49\":2,\"q50\":4,\"q51\":1,\"q52\":3,\"q53\":1,\"q54\":1,\"q55\":1,\"q56\":1,\"q57\":1,\"q58\":1,\"q59\":1,\"q60\":1,\"qv1\":1,\"qv2\":1,\"qv3\":1,\"qv4\":1,\"qv5\":1,\"qv6\":2,\"qv7\":1,\"qv8\":2,\"qv9\":2,\"qv10\":2,\"qv11\":2,\"qv12\":2,\"qv13\":2,\"qv14\":2,\"qv15\":1,\"qv16\":2,\"qv17\":2,\"qv18\":1,\"qv19\":1,\"qv20\":2,\"qv21\":2,\"qv22\":2,\"qv23\":2,\"qv24\":2,\"qv25\":2,\"qv26\":1}',\"2023-03-28 20:02:00\"),(\"merge1\",\"王寿朋\",\"194\",'{\"Gender\":\"m\",\"Age\":\"O\",\"q1O\":3,\"q2O\":2,\"q3O\":2,\"q4O\":2,\"q5O\":3,\"q6O\":4,\"q7O\":4,\"q8O\":3,\"q9O\":4,\"q10O\":2,\"q11O\":4,\"q12O\":4,\"q13O\":4,\"q14O\":4,\"q15O\":4,\"q16O\":4,\"q17O\":4,\"q18O\":3,\"q19O\":4,\"q20O\":4,\"q21O\":4,\"q22O\":4,\"q23O\":4,\"q24O\":4,\"q25O\":4,\"q26O\":4,\"q27O\":3,\"q28O\":3,\"q29O\":3,\"q30O\":4,\"q1\":3,\"q3\":3,\"q4\":3,\"q5\":4,\"q6\":4,\"q8\":3,\"q10\":2,\"q13\":2,\"q14\":4,\"q15\":2,\"q16\":4,\"q17\":4,\"q18\":4,\"q19\":3,\"q20\":3,\"q22\":2,\"q23\":3,\"q25\":2,\"q26\":3,\"q27\":3,\"q28\":4,\"q29\":2,\"q30\":3,\"q31\":2,\"q32\":1,\"q33\":4,\"q34\":4,\"q35\":3,\"q36\":3,\"q37\":2,\"q38\":2,\"q39\":3,\"q40\":2,\"q41\":2,\"q42\":3,\"q43\":2,\"q44\":3,\"q45\":2,\"q46\":2,\"q47\":2,\"q48\":2,\"q49\":2,\"q50\":2,\"q51\":2,\"q52\":2,\"q53\":3,\"q54\":2,\"q55\":2,\"q56\":3,\"q57\":2,\"q58\":2,\"q59\":2,\"q60\":2,\"qv1\":1,\"qv2\":2,\"qv3\":2,\"qv4\":2,\"qv5\":2,\"qv6\":2,\"qv7\":2,\"qv8\":1,\"qv9\":1,\"qv10\":2,\"qv11\":1,\"qv12\":2,\"qv13\":2,\"qv14\":2,\"qv15\":2,\"qv16\":1,\"qv17\":2,\"qv18\":1,\"qv19\":2,\"qv20\":2,\"qv21\":2,\"qv22\":2,\"qv23\":1,\"qv24\":2,\"qv25\":2,\"qv26\":2}',\"2023-03-28 20:02:00\"),(\"merge1\",\"许春堂\",\"195\",'{\"Gender\":\"m\",\"Age\":\"O\",\"q1O\":2,\"q2O\":1,\"q3O\":1,\"q4O\":1,\"q5O\":5,\"q6O\":5,\"q7O\":5,\"q8O\":4,\"q9O\":5,\"q10O\":1,\"q11O\":4,\"q12O\":5,\"q13O\":5,\"q14O\":5,\"q15O\":5,\"q16O\":5,\"q17O\":5,\"q18O\":4,\"q19O\":2,\"q20O\":5,\"q21O\":4,\"q22O\":5,\"q23O\":5,\"q24O\":5,\"q25O\":5,\"q26O\":4,\"q27O\":4,\"q28O\":4,\"q29O\":4,\"q30O\":2,\"q1\":4,\"q3\":2,\"q4\":1,\"q5\":1,\"q6\":4,\"q8\":3,\"q10\":1,\"q13\":3,\"q14\":4,\"q15\":1,\"q16\":1,\"q17\":3,\"q18\":4,\"q19\":4,\"q20\":1,\"q22\":2,\"q23\":2,\"q25\":2,\"q26\":1,\"q27\":2,\"q28\":3,\"q29\":2,\"q30\":3,\"q31\":2,\"q32\":2,\"q33\":1,\"q34\":1,\"q35\":2,\"q36\":2,\"q37\":1,\"q38\":3,\"q39\":1,\"q40\":2,\"q41\":1,\"q42\":2,\"q43\":2,\"q44\":3,\"q45\":2,\"q46\":1,\"q47\":2,\"q48\":1,\"q49\":1,\"q50\":1,\"q51\":1,\"q52\":2,\"q53\":3,\"q54\":3,\"q55\":1,\"q56\":1,\"q57\":3,\"q58\":1,\"q59\":1,\"q60\":2,\"qv1\":2,\"qv2\":2,\"qv3\":1,\"qv4\":2,\"qv5\":1,\"qv6\":2,\"qv7\":2,\"qv8\":2,\"qv9\":1,\"qv10\":2,\"qv11\":1,\"qv12\":2,\"qv13\":2,\"qv14\":2,\"qv15\":2,\"qv16\":2,\"qv17\":2,\"qv18\":1,\"qv19\":2,\"qv20\":2,\"qv21\":2,\"qv22\":2,\"qv23\":2,\"qv24\":2,\"qv25\":2,\"qv26\":2}',\"2023-03-28 20:02:00\"),(\"merge1\",\"王连秀\",\"196\",'{\"Gender\":\"f\",\"Age\":\"O\",\"q1O\":1,\"q2O\":4,\"q3O\":2,\"q4O\":1,\"q5O\":5,\"q6O\":5,\Line truncated
]
}
],
"source": [ "source": [
"import openpyxl\n", "import openpyxl\n",
"import json\n", "import json\n",
@@ -626,27 +611,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 4, "execution_count": null,
"id": "fa0969fb-36e3-48e0-b76d-00c7a138369c", "id": "fa0969fb-36e3-48e0-b76d-00c7a138369c",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2023-04-12T15:11:28.635935Z",
"iopub.status.busy": "2023-04-12T15:11:28.635099Z",
"iopub.status.idle": "2023-04-12T15:11:29.078009Z",
"shell.execute_reply": "2023-04-12T15:11:29.077072Z",
"shell.execute_reply.started": "2023-04-12T15:11:28.635910Z"
},
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"(\"merge1\",\"孙汉英\",\"102\",'{\"Gender\":\"f\",\"Age\":\"O\",\"q1O\":2,\"q2O\":1,\"q3O\":1,\"q4O\":1,\"q5O\":5,\"q6O\":5,\"q7O\":5,\"q8O\":5,\"q9O\":5,\"q10O\":1,\"q11O\":4,\"q12O\":5,\"q13O\":5,\"q14O\":5,\"q15O\":5,\"q16O\":5,\"q17O\":5,\"q18O\":3,\"q19O\":2,\"q20O\":4,\"q21O\":4,\"q22O\":4,\"q23O\":5,\"q24O\":2,\"q25O\":4,\"q26O\":4,\"q27O\":4,\"q28O\":3,\"q29O\":3,\"q30O\":4,\"q1\":5,\"q3\":3,\"q4\":2,\"q5\":2,\"q6\":4,\"q8\":3,\"q10\":1,\"q13\":2,\"q14\":1,\"q15\":2,\"q16\":1,\"q17\":2,\"q18\":2,\"q19\":1,\"q20\":3,\"q22\":2,\"q23\":2,\"q25\":4,\"q26\":4,\"q27\":4,\"q28\":1,\"q29\":2,\"q30\":1,\"q31\":2,\"q32\":3,\"q33\":1,\"q34\":2,\"q35\":2,\"q36\":2,\"q37\":2,\"q38\":4,\"q39\":1,\"q40\":4,\"q41\":4,\"q42\":1,\"q43\":2,\"q44\":1,\"q45\":3,\"q46\":3,\"q47\":1,\"q48\":1,\"q49\":1,\"q50\":1,\"q51\":1,\"q52\":2,\"q53\":1,\"q54\":3,\"q55\":3,\"q56\":3,\"q57\":1,\"q58\":1,\"q59\":1,\"q60\":2,\"qv1\":1,\"qv2\":2,\"qv3\":2,\"qv4\":2,\"qv5\":2,\"qv6\":1,\"qv7\":2,\"qv8\":2,\"qv9\":2,\"qv10\":2,\"qv11\":2,\"qv12\":2,\"qv13\":2,\"qv14\":2,\"qv15\":2,\"qv16\":2,\"qv17\":2,\"qv18\":2,\"qv19\":2,\"qv20\":2,\"qv21\":2,\"qv22\":2,\"qv23\":2,\"qv24\":2,\"qv25\":2,\"qv26\":2}',\"2023-03-28 20:02:00\"),\n"
]
}
],
"source": [ "source": [
"import openpyxl\n", "import openpyxl\n",
"import json\n", "import json\n",
@@ -658,7 +628,7 @@
"sheet = wb.active\n", "sheet = wb.active\n",
"# sheets = wb.sheetnames\n", "# sheets = wb.sheetnames\n",
"dict1 = {}\n", "dict1 = {}\n",
"xinzeng = [102]\n", "xinzeng = [230,232]\n",
"no_xinli = [286]\n", "no_xinli = [286]\n",
"zy = [2,7,9,11,12,21,24]\n", "zy = [2,7,9,11,12,21,24]\n",
"sheet = wb.active\n", "sheet = wb.active\n",
@@ -767,27 +737,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": null,
"id": "b51b73fa-97fa-473c-ab8a-d1fd958eb52a", "id": "b51b73fa-97fa-473c-ab8a-d1fd958eb52a",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2023-04-12T14:59:49.896389Z",
"iopub.status.busy": "2023-04-12T14:59:49.895510Z",
"iopub.status.idle": "2023-04-12T14:59:50.133963Z",
"shell.execute_reply": "2023-04-12T14:59:50.133231Z",
"shell.execute_reply.started": "2023-04-12T14:59:49.896349Z"
},
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"ok\n"
]
}
],
"source": [ "source": [
"import openpyxl\n", "import openpyxl\n",
"import json\n", "import json\n",
@@ -1383,16 +1338,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 79, "execution_count": null,
"id": "09b893e1-0012-4610-aac0-9361685bdf37", "id": "09b893e1-0012-4610-aac0-9361685bdf37",
"metadata": { "metadata": {
"execution": {
"iopub.execute_input": "2023-04-11T09:41:50.755500Z",
"iopub.status.busy": "2023-04-11T09:41:50.754647Z",
"iopub.status.idle": "2023-04-11T09:41:50.936375Z",
"shell.execute_reply": "2023-04-11T09:41:50.935566Z",
"shell.execute_reply.started": "2023-04-11T09:41:50.755459Z"
},
"tags": [] "tags": []
}, },
"outputs": [], "outputs": [],