20240603
This commit is contained in:
1 parent
a00b1f56fc
commit
a7b57a9eaf
3 files changed
+1150
-9
No files matched your search
+6
-6
@@ -305,15 +305,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"execution_count": 10,
|
||||
"id": "314f9709-4c13-4f8b-bca6-fc2122a9054e",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-06-01T06:44:51.160155Z",
|
||||
"iopub.status.busy": "2024-06-01T06:44:51.159397Z",
|
||||
"iopub.status.idle": "2024-06-01T06:44:51.205995Z",
|
||||
"shell.execute_reply": "2024-06-01T06:44:51.205465Z",
|
||||
"shell.execute_reply.started": "2024-06-01T06:44:51.160088Z"
|
||||
"iopub.execute_input": "2024-06-02T01:04:12.743929Z",
|
||||
"iopub.status.busy": "2024-06-02T01:04:12.742863Z",
|
||||
"iopub.status.idle": "2024-06-02T01:04:12.793583Z",
|
||||
"shell.execute_reply": "2024-06-02T01:04:12.792951Z",
|
||||
"shell.execute_reply.started": "2024-06-02T01:04:12.743871Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
|
||||
+119
-1
@@ -854,10 +854,128 @@
|
||||
"print(len(all))\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5e97c15a-8f92-4c17-9f2e-cb76a2e0043b",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## 统计问卷人员情况表"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"id": "f93523ed-a9fb-46f4-8f38-17ebde168303",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-06-03T05:27:38.006019Z",
|
||||
"iopub.status.busy": "2024-06-03T05:27:38.005067Z",
|
||||
"iopub.status.idle": "2024-06-03T05:27:38.015980Z",
|
||||
"shell.execute_reply": "2024-06-03T05:27:38.014890Z",
|
||||
"shell.execute_reply.started": "2024-06-03T05:27:38.005949Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"['18993727823', '18909376562', '18993710970', '18997374506', '18997372109', '18093715987', '18997372608', '18993722556', '18993710998', '18993729661', '18993710973', '18993714097', '18909376963', '18993728737']\n",
|
||||
"20\n",
|
||||
"18\n",
|
||||
"42\n",
|
||||
"44\n",
|
||||
"61\n",
|
||||
"62\n",
|
||||
"24\n",
|
||||
"68\n",
|
||||
"9\n",
|
||||
"3\n",
|
||||
"55\n",
|
||||
"33\n",
|
||||
"5\n",
|
||||
"50\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import json\n",
|
||||
"import csv\n",
|
||||
"import openpyxl\n",
|
||||
"import time\n",
|
||||
"from datetime import date\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"filename = 'data/青海2024.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict3 = json.load(fl)\n",
|
||||
"\n",
|
||||
"phone = {}\n",
|
||||
"for k,v in dict3.items():\n",
|
||||
" if 'phone' in v.keys():\n",
|
||||
" phone[v['phone']] = k\n",
|
||||
"list1 = []\n",
|
||||
"filename = 'data/Survey_20240603.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",
|
||||
" if line[2] in phone.keys() and line[2] not in list1:\n",
|
||||
" list1.append(line[2])\n",
|
||||
"print(list1) \n",
|
||||
"for item in list1:\n",
|
||||
" print(phone[item])"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c175912f-a1ea-4849-8bfa-3a9e25883850",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## 统计报告发送情况表"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"id": "953e6f09-74dd-48cf-810e-ffe78f621c81",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-06-03T08:53:03.990417Z",
|
||||
"iopub.status.busy": "2024-06-03T08:53:03.989701Z",
|
||||
"iopub.status.idle": "2024-06-03T08:53:04.015802Z",
|
||||
"shell.execute_reply": "2024-06-03T08:53:04.014751Z",
|
||||
"shell.execute_reply.started": "2024-06-03T08:53:03.990354Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import json\n",
|
||||
"import openpyxl\n",
|
||||
"\n",
|
||||
"filename = 'data/result_青海all_1.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl)\n",
|
||||
"list1 = []\n",
|
||||
"for k,v in dict1.items():\n",
|
||||
" list2 = []\n",
|
||||
" list2 = [k,v['name'],v['sex'],v['unit'],v['phone']]\n",
|
||||
" list1.append(list2)\n",
|
||||
"\n",
|
||||
"filename = 'data/青海体测报告发送明细.xlsx'\n",
|
||||
"wb = openpyxl.Workbook()\n",
|
||||
"sheet = wb.active\n",
|
||||
"\n",
|
||||
"for row in list1:\n",
|
||||
" sheet.append(row)\n",
|
||||
" \n",
|
||||
"wb.save(filename) "
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "5d3bfc19-f3c9-4dc6-a628-785674e49666",
|
||||
"id": "56a76ae9-bd4f-48ad-9e4c-ee16873b5850",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
|
||||
+1025
-2
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user