20230426
This commit is contained in:
1 parent
60cd4d2643
commit
d5af3bcb91
6 files changed
+896
-218
No files matched your search
+39
-36
@@ -10,15 +10,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 106,
|
||||
"execution_count": 110,
|
||||
"id": "1b92b7c5-cb77-49da-95b7-34827ecf1d16",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2023-04-24T10:05:01.926272Z",
|
||||
"iopub.status.busy": "2023-04-24T10:05:01.925417Z",
|
||||
"iopub.status.idle": "2023-04-24T10:05:04.468748Z",
|
||||
"shell.execute_reply": "2023-04-24T10:05:04.467687Z",
|
||||
"shell.execute_reply.started": "2023-04-24T10:05:01.926232Z"
|
||||
"iopub.execute_input": "2023-04-25T10:41:09.138090Z",
|
||||
"iopub.status.busy": "2023-04-25T10:41:09.137225Z",
|
||||
"iopub.status.idle": "2023-04-25T10:41:11.696860Z",
|
||||
"shell.execute_reply": "2023-04-25T10:41:11.695874Z",
|
||||
"shell.execute_reply.started": "2023-04-25T10:41:09.138049Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
@@ -46,7 +46,11 @@
|
||||
" code = int(sheet.cell(n, 1).value)\n",
|
||||
" person.setdefault(code, {})\n",
|
||||
" dict1 = {}\n",
|
||||
" dict1['name'] = sheet.cell(n, 2).value \n",
|
||||
" dict1['name'] = sheet.cell(n, 2).value\n",
|
||||
" if sheet.cell(n, 7).value ==1:\n",
|
||||
" sex = '男'\n",
|
||||
" else:\n",
|
||||
" sex = '女'\n",
|
||||
" dict1['sex'] = sheet.cell(n, 3).value\n",
|
||||
" birth = str(sheet.cell(n, 6).value).split()[0]\n",
|
||||
" dict1['birth'] = birth\n",
|
||||
@@ -85,15 +89,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 107,
|
||||
"execution_count": 111,
|
||||
"id": "71e1ec6a-6797-4496-969a-1d1461b9ea58",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2023-04-24T10:06:37.571983Z",
|
||||
"iopub.status.busy": "2023-04-24T10:06:37.571077Z",
|
||||
"iopub.status.idle": "2023-04-24T10:06:37.786825Z",
|
||||
"shell.execute_reply": "2023-04-24T10:06:37.785861Z",
|
||||
"shell.execute_reply.started": "2023-04-24T10:06:37.571941Z"
|
||||
"iopub.execute_input": "2023-04-25T10:41:24.604593Z",
|
||||
"iopub.status.busy": "2023-04-25T10:41:24.603754Z",
|
||||
"iopub.status.idle": "2023-04-25T10:41:24.838577Z",
|
||||
"shell.execute_reply": "2023-04-25T10:41:24.837823Z",
|
||||
"shell.execute_reply.started": "2023-04-25T10:41:24.604553Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
@@ -102,10 +106,9 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"423\n",
|
||||
"5593 刘安全 已测试!\n",
|
||||
"423\n",
|
||||
"2645\n"
|
||||
"454\n",
|
||||
"454\n",
|
||||
"3099\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -128,7 +131,7 @@
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl) \n",
|
||||
"\n",
|
||||
"filename = 'data/places_result_20230424.csv'\n",
|
||||
"filename = 'data/places_result_20230425.csv'\n",
|
||||
"with open(filename,'r',newline='') as csv_file:\n",
|
||||
" fl = csv.reader(csv_file,delimiter=',')\n",
|
||||
" header = next(fl) \n",
|
||||
@@ -161,7 +164,7 @@
|
||||
" else:\n",
|
||||
" for k1,v1 in v.items():\n",
|
||||
" dict2[k][k1] = v1\n",
|
||||
"filename = 'data/result_燕山石化(20230424).json'\n",
|
||||
"filename = 'data/result_燕山石化(20230425).json'\n",
|
||||
"with open(filename,'w') as fl:\n",
|
||||
" json.dump(re_ta, fl, ensure_ascii=False) \n",
|
||||
"print(len(re_ta))\n",
|
||||
@@ -181,15 +184,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 108,
|
||||
"execution_count": 112,
|
||||
"id": "c24880ad-bbbd-4ad8-a894-cbcea389e822",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2023-04-24T10:08:16.575368Z",
|
||||
"iopub.status.busy": "2023-04-24T10:08:16.574601Z",
|
||||
"iopub.status.idle": "2023-04-24T10:08:16.751333Z",
|
||||
"shell.execute_reply": "2023-04-24T10:08:16.750617Z",
|
||||
"shell.execute_reply.started": "2023-04-24T10:08:16.575338Z"
|
||||
"iopub.execute_input": "2023-04-25T10:41:45.914369Z",
|
||||
"iopub.status.busy": "2023-04-25T10:41:45.913494Z",
|
||||
"iopub.status.idle": "2023-04-25T10:41:46.098743Z",
|
||||
"shell.execute_reply": "2023-04-25T10:41:46.098046Z",
|
||||
"shell.execute_reply.started": "2023-04-25T10:41:45.914321Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
@@ -200,7 +203,7 @@
|
||||
"\n",
|
||||
"items = ['身高','体重','肺活量','握力','坐位体前屈','纵跳','俯卧撑','一分钟仰卧起坐','单脚站立','选择反应时','台阶指数']\n",
|
||||
"title = ['编号','姓名','性别','单位','车间','班组','身高','体重','肺活量','握力','坐位体前屈','纵跳','俯卧撑','一分钟仰卧起坐','单脚站立','选择反应时','台阶指数']\n",
|
||||
"filename = 'data/result_燕山石化(20230424).json'\n",
|
||||
"filename = 'data/result_燕山石化(20230425).json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl)\n",
|
||||
"\n",
|
||||
@@ -225,7 +228,7 @@
|
||||
" else:\n",
|
||||
" list2.append('') \n",
|
||||
" list1.append(list2)\n",
|
||||
"filename = 'data/燕山石化体测情况表(20230424).xlsx'\n",
|
||||
"filename = 'data/燕山石化体测情况表(20230425).xlsx'\n",
|
||||
"wb = openpyxl.Workbook()\n",
|
||||
"sheet = wb.active\n",
|
||||
"sheet.append(title)\n",
|
||||
@@ -245,15 +248,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 109,
|
||||
"execution_count": 113,
|
||||
"id": "68454877-f1fe-4eed-8a48-265e428f892e",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2023-04-24T10:08:30.444506Z",
|
||||
"iopub.status.busy": "2023-04-24T10:08:30.444058Z",
|
||||
"iopub.status.idle": "2023-04-24T10:08:30.475858Z",
|
||||
"shell.execute_reply": "2023-04-24T10:08:30.474801Z",
|
||||
"shell.execute_reply.started": "2023-04-24T10:08:30.444476Z"
|
||||
"iopub.execute_input": "2023-04-25T10:41:58.467679Z",
|
||||
"iopub.status.busy": "2023-04-25T10:41:58.467274Z",
|
||||
"iopub.status.idle": "2023-04-25T10:41:58.499250Z",
|
||||
"shell.execute_reply": "2023-04-25T10:41:58.498205Z",
|
||||
"shell.execute_reply.started": "2023-04-25T10:41:58.467652Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
@@ -262,7 +265,7 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"{'行政事务中心(离退中心)工会': 8, '热电厂工会': 1, '化学品厂工会': 55, '高科公司工会': 102, '炼油厂工会': 51, '有机化工厂工会': 131, '检验计量中心工会': 32, '物装中心工会': 2, '生产运行保障中心': 2, '烯烃厂工会': 6, '机关工会': 8, '合成树脂厂': 14, '消防中心工会': 2, '合成橡胶厂工会': 8, '储运厂工会': 1}\n"
|
||||
"{'行政事务中心(离退中心)工会': 18, '炼油厂工会': 95, '化学品厂工会': 67, '高科公司工会': 109, '烯烃厂工会': 13, '有机化工厂工会': 98, '储运厂工会': 8, '检验计量中心工会': 16, '教育培训中心工会': 1, '合成橡胶厂工会': 10, '合成树脂厂': 10, '消防中心工会': 1, '生产运行保障中心': 1, '物装中心工会': 2, '机关工会': 5}\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -270,7 +273,7 @@
|
||||
"import json\n",
|
||||
"import openpyxl\n",
|
||||
"\n",
|
||||
"filename = 'data/result_燕山石化(20230424).json'\n",
|
||||
"filename = 'data/result_燕山石化(20230425).json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl)\n",
|
||||
"dict2 = {}\n",
|
||||
@@ -285,7 +288,7 @@
|
||||
" list2 = []\n",
|
||||
" list2 = [k,v]\n",
|
||||
" list1.append(list2)\n",
|
||||
"filename = 'data/燕山石化部门测试人数情况表(20230424).xlsx'\n",
|
||||
"filename = 'data/燕山石化部门测试人数情况表(20230425).xlsx'\n",
|
||||
"wb = openpyxl.Workbook()\n",
|
||||
"sheet = wb.active\n",
|
||||
"sheet.append(title)\n",
|
||||
|
||||
Reference in new issue
Block a user