This commit is contained in:
512song committed 2023-09-18 19:46:01 +08:00
1 parent e1da612c61
commit 48cb4d6187
3 files changed
+267 -16

No files matched your search

+33 -7
View File
@@ -68,12 +68,28 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"id": "fd73b8be-d3fe-49aa-99d2-3cc6df4a3eb0",
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-18T02:28:13.173784Z",
"iopub.status.busy": "2023-09-18T02:28:13.173377Z",
"iopub.status.idle": "2023-09-18T02:28:13.258454Z",
"shell.execute_reply": "2023-09-18T02:28:13.257893Z",
"shell.execute_reply.started": "2023-09-18T02:28:13.173753Z"
},
"tags": []
},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"523\n",
"523\n"
]
}
],
"source": [
"import json\n",
"import time\n",
@@ -89,11 +105,11 @@
"re_ta = {}\n",
"dict1 = {}\n",
"list1 = []\n",
"filename = 'data/北京农行人员名单.json'\n",
"filename = 'data/北京农行人员名单all.json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl) \n",
"\n",
"filename = 'data/places_result_20230521.csv'\n",
"filename = 'data/places_result_20230918.csv'\n",
"with open(filename,'r',newline='') as csv_file:\n",
" fl = csv.reader(csv_file,delimiter=',')\n",
" header = next(fl) \n",
@@ -113,6 +129,7 @@
" re_ta[user].setdefault(item_name,{}) \n",
" score = int(result[4])/item[m_item]['divisor'] \n",
" re_ta[user][item_name]['成绩'] = f'{score} {item[m_item][\"unit\"]}'\n",
" re_ta[user][item_name]['得分'] = result[5]\n",
"print(len(re_ta))\n",
"filename = 'data/result_北京农行.json'\n",
"\n",
@@ -131,9 +148,16 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"id": "b870bd6e-f972-4073-b13d-5fda8cc92bb7",
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-18T02:33:35.544712Z",
"iopub.status.busy": "2023-09-18T02:33:35.544319Z",
"iopub.status.idle": "2023-09-18T02:33:35.710354Z",
"shell.execute_reply": "2023-09-18T02:33:35.709872Z",
"shell.execute_reply.started": "2023-09-18T02:33:35.544678Z"
},
"tags": []
},
"outputs": [],
@@ -148,7 +172,7 @@
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl)\n",
"\n",
"filename = 'data/北京农行人员名单.json'\n",
"filename = 'data/北京农行人员名单all.json'\n",
"with open(filename,'r') as fl:\n",
" dict2 = json.load(fl)\n",
" \n",
@@ -161,11 +185,13 @@
" list2.append(dict2[k]['unit'])\n",
" for item in items:\n",
" if item in v.keys():\n",
" list2.append(v[item]['成绩']) \n",
" list2.append(v[item]['成绩']) \n",
" list2.append(v[item]['得分']) \n",
" elif item =='name':\n",
" list2.append(v[item])\n",
" else:\n",
" list2.append('') \n",
" list2.append('') \n",
" list1.append(list2)\n",
"filename = 'data/北京农行体测情况.xlsx'\n",
"wb = openpyxl.Workbook()\n",