20251119
This commit is contained in:
1 parent
31ddcb887f
commit
4f0f65a076
6 files changed
+1896
-136
No files matched your search
+54
-27
@@ -2148,6 +2148,57 @@
|
||||
"wb.save(filename)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "ab2ff226-2c58-495c-ad52-7cb3dc8a1dfd",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## 添加班次信息"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"id": "557508ff-842c-4e15-93fa-457b571223a8",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-11-19T06:12:59.269561Z",
|
||||
"iopub.status.busy": "2025-11-19T06:12:59.269005Z",
|
||||
"iopub.status.idle": "2025-11-19T06:12:59.475923Z",
|
||||
"shell.execute_reply": "2025-11-19T06:12:59.475387Z",
|
||||
"shell.execute_reply.started": "2025-11-19T06:12:59.269511Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"ok!\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import openpyxl\n",
|
||||
"import json\n",
|
||||
"from datetime import date\n",
|
||||
"\n",
|
||||
"wb = openpyxl.load_workbook('data/镇海体质监测人员名单(已标注班次).xlsx')\n",
|
||||
"sheet = wb.active\n",
|
||||
"filename = 'data/data_镇海2025.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict2 = json.load(fl) \n",
|
||||
"\n",
|
||||
"for n in range(2, sheet.max_row+1):\n",
|
||||
" code = str(sheet.cell(n, 1).value).lower()\n",
|
||||
" if code in dict2.keys():\n",
|
||||
" banci = sheet.cell(n, 6).value\n",
|
||||
" dict2[code]['banci'] = banci\n",
|
||||
"with open(filename,'w') as fl:\n",
|
||||
" json.dump(dict2,fl , ensure_ascii=False) \n",
|
||||
"print('ok!') \n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "0d7d8dd1-45f7-455d-8db3-38febc2a2395",
|
||||
@@ -2537,26 +2588,10 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 96,
|
||||
"execution_count": null,
|
||||
"id": "9663b933-57f4-486c-80e6-f9d513bbe6a8",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-11-14T07:35:38.747096Z",
|
||||
"iopub.status.busy": "2025-11-14T07:35:38.746559Z",
|
||||
"iopub.status.idle": "2025-11-14T07:35:38.947152Z",
|
||||
"shell.execute_reply": "2025-11-14T07:35:38.945993Z",
|
||||
"shell.execute_reply.started": "2025-11-14T07:35:38.747068Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"+8613793180751 send success\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from tencentcloud.common import credential\n",
|
||||
"from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException\n",
|
||||
@@ -2676,14 +2711,6 @@
|
||||
" except TencentCloudSDKException as err:\n",
|
||||
" print(v['phone'],err)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "02501165-d375-4101-8a97-107b52cccdc2",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
|
||||
Reference in new issue
Block a user