20231127
This commit is contained in:
1 parent
3b4acc857c
commit
2d6db59b1c
4 files changed
+350
-117
No files matched your search
+28
-13
@@ -10,18 +10,33 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 8,
|
||||
"id": "bbba6efc-73cd-4db6-bae7-014724fee731",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2023-11-26T12:30:54.402556Z",
|
||||
"iopub.status.busy": "2023-11-26T12:30:54.402097Z",
|
||||
"iopub.status.idle": "2023-11-26T12:30:54.454920Z",
|
||||
"shell.execute_reply": "2023-11-26T12:30:54.453841Z",
|
||||
"shell.execute_reply.started": "2023-11-26T12:30:54.402519Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"ok\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import openpyxl\n",
|
||||
"import json\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"wb = openpyxl.load_workbook('data/报名登记表142人.xlsx')\n",
|
||||
"wb = openpyxl.load_workbook('data/报名登记表164人.xlsx')\n",
|
||||
"sheet = wb.active\n",
|
||||
"# sheets = wb.sheetnames\n",
|
||||
"person = {}\n",
|
||||
@@ -89,15 +104,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"execution_count": 9,
|
||||
"id": "970e171e-1360-448f-a28c-520ccb8f314a",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2023-10-18T02:17:23.733390Z",
|
||||
"iopub.status.busy": "2023-10-18T02:17:23.733131Z",
|
||||
"iopub.status.idle": "2023-10-18T02:17:23.758353Z",
|
||||
"shell.execute_reply": "2023-10-18T02:17:23.757550Z",
|
||||
"shell.execute_reply.started": "2023-10-18T02:17:23.733366Z"
|
||||
"iopub.execute_input": "2023-11-26T12:31:39.094899Z",
|
||||
"iopub.status.busy": "2023-11-26T12:31:39.094370Z",
|
||||
"iopub.status.idle": "2023-11-26T12:31:39.114981Z",
|
||||
"shell.execute_reply": "2023-11-26T12:31:39.114071Z",
|
||||
"shell.execute_reply.started": "2023-11-26T12:31:39.094860Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
@@ -106,8 +121,8 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"141\n",
|
||||
"141\n"
|
||||
"16\n",
|
||||
"16\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -130,7 +145,7 @@
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl) \n",
|
||||
"\n",
|
||||
"filename = 'data/places_result_20231018.csv'\n",
|
||||
"filename = 'data/places_result_20231126.csv'\n",
|
||||
"with open(filename,'r',newline='') as csv_file:\n",
|
||||
" fl = csv.reader(csv_file,delimiter=',')\n",
|
||||
" header = next(fl) \n",
|
||||
@@ -151,7 +166,7 @@
|
||||
" score = int(result[4])/item[m_item]['divisor'] \n",
|
||||
" re_ta[user][item_name]['成绩'] = f'{score} {item[m_item][\"unit\"]}'\n",
|
||||
"print(len(re_ta))\n",
|
||||
"filename = 'data/result_北京党校.json'\n",
|
||||
"filename = 'data/result_北京党校20231126.json'\n",
|
||||
"\n",
|
||||
"with open(filename,'w') as fl:\n",
|
||||
" json.dump(re_ta, fl, ensure_ascii=False) \n",
|
||||
|
||||
Reference in new issue
Block a user