This commit is contained in:
512song committed 2023-11-11 22:46:28 +08:00
1 parent bb45950ba6
commit bec78cd290
4 files changed
+394 -193

No files matched your search

+65 -120
View File
@@ -10,27 +10,12 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"id": "abde40cd-d8e3-434d-ade2-207cf80cab49",
"metadata": {
"execution": {
"iopub.execute_input": "2023-10-27T05:16:54.569572Z",
"iopub.status.busy": "2023-10-27T05:16:54.568768Z",
"iopub.status.idle": "2023-10-27T05:16:54.594762Z",
"shell.execute_reply": "2023-10-27T05:16:54.592567Z",
"shell.execute_reply.started": "2023-10-27T05:16:54.569497Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ok\n"
]
}
],
"outputs": [],
"source": [
"import json\n",
"\n",
@@ -56,6 +41,57 @@
"print('ok')"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "1a261b8f-6fa8-41d6-8449-9987ca55133f",
"metadata": {
"execution": {
"iopub.execute_input": "2023-11-10T02:31:09.764304Z",
"iopub.status.busy": "2023-11-10T02:31:09.763832Z",
"iopub.status.idle": "2023-11-10T02:31:09.786184Z",
"shell.execute_reply": "2023-11-10T02:31:09.785822Z",
"shell.execute_reply.started": "2023-11-10T02:31:09.764268Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ok\n"
]
}
],
"source": [
"import openpyxl\n",
"import json\n",
"\n",
"\n",
"wb = openpyxl.load_workbook('data/世纪花园人员信息.xlsx')\n",
"sheet = wb.active\n",
"# sheets = wb.sheetnames\n",
"person = {}\n",
"\n",
"for n in range(1, sheet.max_row+1):\n",
" code = int(sheet.cell(n, 1).value)\n",
" person.setdefault(code, {})\n",
" dict1 = {}\n",
" dict1['name'] = sheet.cell(n, 2).value\n",
" dict1['unit'] = sheet.cell(n, 6).value\n",
" dict1['sex'] = sheet.cell(n, 3).value\n",
" dict1['birth'] = str(sheet.cell(n,4).value).split(' ')[0]\n",
" if sheet.cell(n,5).value is not None:\n",
" dict1['phone'] = str(sheet.cell(n,5).value)\n",
" \n",
" person[code] = dict1\n",
"filename = 'data/世纪花园人员信息.json'\n",
"with open(filename, 'w') as fl:\n",
" json.dump(person, fl, ensure_ascii=False)\n",
"print('ok')"
]
},
{
"cell_type": "markdown",
"id": "0dc90cf8-0a51-49ab-8f93-81acfd359e63",
@@ -66,28 +102,12 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"id": "693820f4-f79d-4e6b-9901-0aae57bc6c92",
"metadata": {
"execution": {
"iopub.execute_input": "2023-10-27T05:21:49.693975Z",
"iopub.status.busy": "2023-10-27T05:21:49.693687Z",
"iopub.status.idle": "2023-10-27T05:21:49.714898Z",
"shell.execute_reply": "2023-10-27T05:21:49.714209Z",
"shell.execute_reply.started": "2023-10-27T05:21:49.693956Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"84\n",
"84\n"
]
}
],
"outputs": [],
"source": [
"import json\n",
"import datetime\n",
@@ -178,27 +198,12 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": null,
"id": "9230c78a-40d1-47ed-9bfc-94525b44f8f9",
"metadata": {
"execution": {
"iopub.execute_input": "2023-10-27T06:50:35.251325Z",
"iopub.status.busy": "2023-10-27T06:50:35.250643Z",
"iopub.status.idle": "2023-10-27T06:50:35.319251Z",
"shell.execute_reply": "2023-10-27T06:50:35.317670Z",
"shell.execute_reply.started": "2023-10-27T06:50:35.251263Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ok!\n"
]
}
],
"outputs": [],
"source": [
"import json\n",
"import time\n",
@@ -341,27 +346,12 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": null,
"id": "c42bb7f4-ae16-4950-8fc9-97e7084e4615",
"metadata": {
"execution": {
"iopub.execute_input": "2023-10-27T06:52:29.033946Z",
"iopub.status.busy": "2023-10-27T06:52:29.033331Z",
"iopub.status.idle": "2023-10-27T06:52:29.132179Z",
"shell.execute_reply": "2023-10-27T06:52:29.130961Z",
"shell.execute_reply.started": "2023-10-27T06:52:29.033886Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ok\n"
]
}
],
"outputs": [],
"source": [
"import openpyxl\n",
"import json\n",
@@ -422,16 +412,9 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": null,
"id": "6038af14-e3cf-4e79-9a02-a5d70cb2ed65",
"metadata": {
"execution": {
"iopub.execute_input": "2023-10-27T05:38:50.524545Z",
"iopub.status.busy": "2023-10-27T05:38:50.523900Z",
"iopub.status.idle": "2023-10-27T05:38:50.593781Z",
"shell.execute_reply": "2023-10-27T05:38:50.592319Z",
"shell.execute_reply.started": "2023-10-27T05:38:50.524484Z"
},
"tags": []
},
"outputs": [],
@@ -469,16 +452,9 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": null,
"id": "096672ef-c1f1-4b31-a490-efd408b95aec",
"metadata": {
"execution": {
"iopub.execute_input": "2023-10-27T06:17:34.577248Z",
"iopub.status.busy": "2023-10-27T06:17:34.576465Z",
"iopub.status.idle": "2023-10-27T06:17:34.622216Z",
"shell.execute_reply": "2023-10-27T06:17:34.620032Z",
"shell.execute_reply.started": "2023-10-27T06:17:34.577174Z"
},
"tags": []
},
"outputs": [],
@@ -526,28 +502,12 @@
},
{
"cell_type": "code",
"execution_count": 38,
"execution_count": null,
"id": "8f801647-a326-4bf1-a651-4b52e0296998",
"metadata": {
"execution": {
"iopub.execute_input": "2023-10-27T07:12:12.444411Z",
"iopub.status.busy": "2023-10-27T07:12:12.443958Z",
"iopub.status.idle": "2023-10-27T07:12:12.457264Z",
"shell.execute_reply": "2023-10-27T07:12:12.455781Z",
"shell.execute_reply.started": "2023-10-27T07:12:12.444370Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['18610346996', '15689048244', '17865910365', '15966972231', '15953353009', '10002268211', '13906430187', '18553352007', '15092304241', '13953302959', '15966961587', '13964419753', '13563031324', '13869301368', '15964480260', '17616402467', '18253372927', '15169322152', '18653360448', '15954798900', '15953329509', '13561616627', '13581038337', '13287083771', '18553317009', '13287888080', '13953398130', '13665330312', '18353398071', '15854858198', '13280681081', '13583315663', '18653359308', '18053370113', '18953363875', '15153328391', '13853328246', '13606433819', '13389690177', '18560316978', '18560316897', '18653307232', '18853386200', '13953318999', '15376796462', '18253301688', '13853346368', '18560317186', '13969319707', '13792162471', '15589361996', '15315223331', '13869320577', '13792166751', '15065872512', '13969392534', '13573392557', '13589563291', '13573349783', '13953350485', '18678200603', '13589537205', '13589537205', '13853357150', '13969308397', '13706432240', '18560317061', '13964391029', '18953343833', '18905332691', '13054890607', '13082715936', '15053312268', '15963301381', '15550301285', '13306436916', '15553312972', '13280682857', '13070619391', '18678109571', '15965521907', '13280632498', '13964466366', '18853366997', '13789896882', '15589388169']\n",
"18610346996\n"
]
}
],
"outputs": [],
"source": [
"import openpyxl\n",
"import json\n",
@@ -583,27 +543,12 @@
},
{
"cell_type": "code",
"execution_count": 40,
"execution_count": null,
"id": "fbe793e4-04cf-4e7d-8fb8-1776ed474ab9",
"metadata": {
"execution": {
"iopub.execute_input": "2023-10-27T07:25:48.897659Z",
"iopub.status.busy": "2023-10-27T07:25:48.897196Z",
"iopub.status.idle": "2023-10-27T07:25:49.038895Z",
"shell.execute_reply": "2023-10-27T07:25:49.038112Z",
"shell.execute_reply.started": "2023-10-27T07:25:48.897615Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"('ptv_0533_sjhy','13070619391','{\"Gender\":\"f\",\"Age\":\"O\",\"q1O\":4,\"q2O\":4,\"q3O\":2,\"q4O\":3,\"q5O\":1,\"q6O\":1,\"q7O\":1,\"q8O\":5,\"q9O\":2,\"q10O\":1,\"q11O\":1,\"q12O\":1,\"q13O\":4,\"q14O\":5,\"q15O\":5,\"q16O\":5,\"q17O\":5,\"q18O\":5,\"q19O\":4,\"q20O\":4,\"q21O\":5,\"q22O\":5,\"q23O\":5,\"q24O\":5,\"q25O\":2,\"q26O\":4,\"q27O\":2,\"q28O\":2,\"q29O\":4,\"q30O\":2,\"q1\":4,\"q3\":1,\"q4\":2,\"q5\":4,\"q6\":4,\"q8\":1,\"q10\":1,\"q13\":4,\"q14\":4,\"q15\":4,\"q16\":5,\"q17\":5,\"q18\":5,\"q19\":5,\"q20\":5,\"q22\":5,\"q23\":1,\"q25\":5,\"q26\":5,\"q27\":1,\"q28\":1,\"q29\":5,\"q30\":5,\"q31\":1,\"q32\":1,\"q33\":2,\"q34\":5,\"q35\":5,\"q36\":1,\"q37\":1,\"q38\":5,\"q39\":5,\"q40\":1,\"q41\":1,\"q42\":5,\"q43\":1,\"q44\":4,\"q45\":1,\"q46\":1,\"q47\":1,\"q48\":5,\"q49\":5,\"q50\":5,\"q51\":1,\"q52\":1,\"q53\":5,\"q54\":5,\"q55\":5,\"q56\":5,\"q57\":5,\"q58\":1,\"q59\":1,\"q60\":5,\"qv1\":1,\"qv2\":1,\"qv3\":1,\"qv4\":2,\"qv5\":1,\"qv6\":1,\"qv7\":2,\"qv8\":1,\"qv9\":2,\"qv10\":1,\"qv11\":1,\"qv12\":1,\"qv13\":2,\"qv14\":2,\"qv15\":1,\"qv16\":1,\"qv17\":1,\"qv18\":1,\"qv19\":1,\"qv20\":2,\"qv21\":1,\"qv22\":2,\"qv23\":2,\"qv24\":1,\"qv25\":1,\"qv26\":2}','2023-10-27 15:00:00'),('ptv_0533_sjhy','13280682857','{\"Gender\":\"f\",\"Age\":\"O\",\"q1O\":2,\"q2O\":2,\"q3O\":2,\"q4O\":1,\"q5O\":4,\"q6O\":4,\"q7O\":4,\"q8O\":4,\"q9O\":4,\"q10O\":1,\"q11O\":3,\"q12O\":5,\"q13O\":4,\"q14O\":4,\"q15O\":4,\"q16O\":5,\"q17O\":4,\"q18O\":4,\"q19O\":4,\"q20O\":3,\"q21O\":5,\"q22O\":5,\"q23O\":5,\"q24O\":5,\"q25O\":3,\"q26O\":4,\"q27O\":4,\"q28O\":4,\"q29O\":3,\"q30O\":4,\"q1\":4,\"q3\":1,\"q4\":3,\"q5\":3,\"q6\":4,\"q8\":2,\"q10\":1,\"q13\":3,\"q14\":1,\"q15\":2,\"q16\":4,\"q17\":3,\"q18\":4,\"q19\":1,\"q20\":1,\"q22\":2,\"q23\":2,\"q25\":1,\"q26\":1,\"q27\":1,\"q28\":3,\"q29\":1,\"q30\":1,\"q31\":3,\"q32\":1,\"q33\":1,\"q34\":1,\"q35\":4,\"q36\":3,\"q37\":1,\"q38\":2,\"q39\":5,\"q40\":1,\"q41\":1,\"q42\":1,\"q43\":1,\"q44\":3,\"q45\":1,\"q46\":1,\"q47\":1,\"q48\":1,\"q49\":2,\"q50\":1,\"q51\":1,\"q52\":1,\"q53\":1,\"q54\":2,\"q55\":1,\"q56\":1,\"q57\":1,\"q58\":1,\"q59\":1,\"q60\":1,\"qv1\":2,\"qv2\":2,\"qv3\":2,\"qv4\":1,\"qv5\":2,\"qv6\":2,\"qv7\":2,\"qv8\":2,\"qv9\":2,\"qv10\":2,\"qv11\":2,\"qv12\":2,\"qv13\":2,\"qv14\":2,\"qv15\":1,\"qv16\":1,\"qv17\":2,\"qv18\":1,\"qv19\":2,\"qv20\":2,\"qv21\":1,\"qv22\":2,\"qv23\":2,\"qv24\":2,\"qv25\":2,\"qv26\":2}','2023-10-27 15:00:00'),('ptv_0533_sjhy','13589537205','{\"Gender\":\"f\",\"Age\":\"O\",\"q1O\":3,\"q2O\":5,\"q3O\":2,\"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\":5,\"q19O\":5,\"q20O\":5,\"q21O\":5,\"q22O\":5,\"q23O\":5,\"q24O\":5,\"q25O\":4,\"q26O\":5,\"q27O\":4,\"q28O\":3,\"q29O\":5,\"q30O\":4,\"q1\":4,\"q3\":2,\"q4\":2,\"q5\":1,\"q6\":4,\"q8\":1,\"q10\":1,\"q13\":3,\"q14\":4,\"q15\":1,\"q16\":1,\"q17\":3,\"q18\":2,\"q19\":1,\"q20\":3,\"q22\":5,\"q23\":5,\"q25\":3,\"q26\":1,\"q27\":3,\"q28\":1,\"q29\":1,\"q30\":5,\"q31\":1,\"q32\":3,\"q33\":5,\"q34\":2,\"q35\":2,\"q36\":1,\"q37\":1,\"q38\":5,\"q39\":5,\"q40\":5,\"q41\":1,\"q42\":1,\"q43\":1,\"q44\":3,\"q45\":5,\"q46\":1,\"q47\":3,\"q48\":1,\"q49\":1,\"q50\":1,\"q51\":1,\"q52\":1,\"q53\":1,\"q54\":2,\"q55\":1,\"q56\":1,\"q57\":1,\"q58\":1,\"q59\":1,\"q60\":1,\"qv1\":1,\"qv2\":1,\"qv3\":2,\"qv4\":2,\"qv5\":2,\"qv6\":2,\"qv7\":1,\"qv8\":1,\"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\":2,\"qv25\":2,\"qv26\":2}','2023-10-27 15:00:00'),('ptv_0533_sjhy','13573392557','{\"Gender\":\"f\",\"Age\":\"O\",\"q1O\":5,\"q2O\":5,\"q3O\":5,\"q4O\":5,\"q5O\":5,\"q6O\":5,\"q7O\":5,\"q8O\":2,\"q9O\":5,\"q10O\":1,\"q11O\":5,\"q12O\":5,\"q13O\":5,\"q14O\":5,\"q15O\":5,\"q16O\":5,\"q17O\":5,\"q18O\":5,\"q19O\":5,\"q20O\":5,\"q21O\":5,\"q22O\":5,\"q23O\":5,\"q24O\":5,\"q25O\":3,\"q26O\":5,\"q27O\":2,\"q28O\":5,\"q29O\":3,\"q30O\":3,\"q1\":1,\"q3\":3,\"q4\":1,\"q5\":5,\"q6\":4,\"q8\":5,\"q10\":5,\"q13\":3,\"q14\":2,\"q15\":1,\"q16\":1,\"q17\":4,\"q18\":5,\"q19\":5,\"q20\":5,\"q22\":5,\"q23\":3,\"q25\":2,\"q26\":4,\"q27\":5,\"q28\":5,\"q29\":5,\"q30\":4,\"q31\":1,\"q32\":1,\"q33\":1,\"q34\":1,\"q35\":3,\"q36\":1,\"q37\":1,\"q38\":3,\"q39\":4,\"q40\":5,\"q41\":1,\"q42\":1,\"q43\":2,\"q44\":1,\"q45\":3,\"q46\":1,\"q47\":3,\"q48\":3,\"q49\":2,\"q50\":4,\"q51\":1,\"q52\":4,\"q53\":1,\"q54\":3,\"q55\":3,\"q56\":1,\"q57\":5,\"q58\":3,\"q59\":1,\"q60\":5,\"qv1\":1,\"qv2\":1,\"qv3\":2,\"qv4\":2,\"qv5\":1,\"qv6\":2,\"qv7\":2,\"qv8\":2,\"qv9\":1,\"qv10\":2,\"qv11\":1,\"qv12\":1,\"qv13\":1,\"qv14\":2,\"qv15\":1,\"qv16\":1,\"qv17\":2,\"qv18\":2,\"qv19\":2,\"qv20\":1,\"qv21\":1,\"qv22\":2,\"qv23\":2,\"qv24\":2,\"qv25\":2,\"qv26\":2}','2023-10-27 15:00:00'),('ptv_0533_sjhy','15954798900','{\"Gender\":\"f\",\"Age\":\"O\",\"q1O\":3,\"q2O\":2,\"q3O\":2,\"q4O\":2,\"q5O\":5,\"q6O\":5,\"q7O\":5,\"q8O\":4,\"q9Line truncated
]
}
],
"outputs": [],
"source": [
"import openpyxl\n",
"import json\n",