20211012
This commit is contained in:
1 parent
1ed92be02b
commit
4ccfcaadcc
2 files changed
+286
-35
No files matched your search
@@ -0,0 +1 @@
|
|||||||
|
{"1": {"name": "肺活量", "unit": "毫升", "divisor": 1}, "2": {"name": "握力", "unit": "千克", "divisor": 1000}, "3": {"name": "坐位体前屈", "unit": "厘米", "divisor": 10}, "4": {"name": "纵跳", "unit": "厘米", "divisor": 10}, "5": {"name": "俯卧撑", "unit": "次", "divisor": 1}, "6": {"name": "单脚站立", "unit": "秒", "divisor": 1000}, "7": {"name": "选择反应时", "unit": "秒", "divisor": 1000}, "8": {"name": "台阶指数", "unit": "分", "divisor": 10}, "9": {"name": "一分钟仰卧起坐", "unit": "次", "divisor": 1}, "10": {"name": "身高", "unit": "厘米", "divisor": 10}, "11": {"name": "体重", "unit": "千克", "divisor": 1000}, "12": {"name": "立定跳远", "unit": "厘米", "divisor": 10}, "13": {"name": "网球掷远", "unit": "米", "divisor": 1000}, "14": {"name": "双脚连续跳", "unit": "秒", "divisor": 1000}, "15": {"name": "10米折返跑", "unit": "秒", "divisor": 1000}, "16": {"name": "走平衡木", "unit": "秒", "divisor": 1000}, "17": {"name": "50米跑", "unit": "秒", "divisor": 1000}, "18": {"name": "一分钟跳绳", "unit": "次", "divisor": 1}, "19": {"name": "50米*8往返跑", "unit": "秒", "divisor": 1000}, "20": {"name": "高压", "unit": "mmHg", "divisor": 1}, "21": {"name": "低压", "unit": "mmHg", "divisor": 1}, "22": {"name": "心率", "unit": "次", "divisor": 1}, "23": {"name": "长跑", "unit": "秒", "divisor": 1000}, "24": {"name": "引体向上", "unit": "次", "divisor": 1}, "27": {"name": "实心球", "unit": "米", "divisor": 1000}, "28": {"name": "篮球运球", "unit": "秒", "divisor": 1000}, "29": {"name": "足球运球", "unit": "秒", "divisor": 1000}, "30": {"name": "足球垫球", "unit": "次", "divisor": 1}, "31": {"name": "排球垫球", "unit": "次", "divisor": 1}, "32": {"name": "25米×2往返跑", "unit": "秒", "divisor": 1000}, "33": {"name": "左右眼视力", "unit": "分", "divisor": 10}, "34": {"name": "测试", "unit": "毫升", "divisor": 1}, "37": {"name": "跪卧撑", "unit": "次", "divisor": 1}, "38": {"name": "功率车", "unit": "毫升/千克/分钟", "divisor": 10}}
|
||||||
+285
-35
@@ -69,27 +69,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 26,
|
"execution_count": null,
|
||||||
"id": "91a8f4f4-c417-4db7-94ba-2d3404e5c2c9",
|
"id": "91a8f4f4-c417-4db7-94ba-2d3404e5c2c9",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
|
||||||
"iopub.execute_input": "2021-10-12T07:52:26.950635Z",
|
|
||||||
"iopub.status.busy": "2021-10-12T07:52:26.949701Z",
|
|
||||||
"iopub.status.idle": "2021-10-12T07:52:27.307490Z",
|
|
||||||
"shell.execute_reply": "2021-10-12T07:52:27.304804Z",
|
|
||||||
"shell.execute_reply.started": "2021-10-12T07:52:26.950528Z"
|
|
||||||
},
|
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"ok!\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"import pymongo\n",
|
"import pymongo\n",
|
||||||
"from bson.objectid import ObjectId\n",
|
"from bson.objectid import ObjectId\n",
|
||||||
@@ -129,27 +114,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 19,
|
"execution_count": null,
|
||||||
"id": "d80c482d-aee2-45cf-8ac8-c357171f17f7",
|
"id": "d80c482d-aee2-45cf-8ac8-c357171f17f7",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
|
||||||
"iopub.execute_input": "2021-10-12T06:40:29.318503Z",
|
|
||||||
"iopub.status.busy": "2021-10-12T06:40:29.317557Z",
|
|
||||||
"iopub.status.idle": "2021-10-12T06:40:29.351278Z",
|
|
||||||
"shell.execute_reply": "2021-10-12T06:40:29.348925Z",
|
|
||||||
"shell.execute_reply.started": "2021-10-12T06:40:29.318396Z"
|
|
||||||
},
|
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"{'_id': ObjectId('6164fc343d39c8cdd2d97179'), 'name': '中国石油化工股份有限公司安庆炼化分公司', 'short_name': '安庆炼化', 'depart': ['办公室', '会议中心', '生产计划部', '设备工程部', '发展规划部', '安全环保部', '消防支队', '财务资产部', '企业管理部', '企业发展研究会', '审计部', '党委组织部', '党群工作部', '纪委监督部', '销售中心', '信息中心', '行政事务中心', '炼油一部', '炼油二部', '化工一部', '化工二部', '腈纶部', '热电部', '储运部', '水务部', '运输部', '电气仪表中心', '质管中心', '物资采购中心', '华成公司', '项目管理部', 'AQ基地', '调研']}\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"import openpyxl\n",
|
"import openpyxl\n",
|
||||||
"import json\n",
|
"import json\n",
|
||||||
@@ -168,10 +138,290 @@
|
|||||||
" print(x)"
|
" print(x)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "2bb3cbdd-9fe1-4345-8c5a-53acb1a386de",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## 获取人员测试成绩"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 95,
|
||||||
|
"id": "910c3fcd-121a-42c0-9465-ad79a5829239",
|
||||||
|
"metadata": {
|
||||||
|
"execution": {
|
||||||
|
"iopub.execute_input": "2021-10-12T14:56:11.707898Z",
|
||||||
|
"iopub.status.busy": "2021-10-12T14:56:11.706965Z",
|
||||||
|
"iopub.status.idle": "2021-10-12T14:56:11.819192Z",
|
||||||
|
"shell.execute_reply": "2021-10-12T14:56:11.816891Z",
|
||||||
|
"shell.execute_reply.started": "2021-10-12T14:56:11.707790Z"
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "stdout",
|
||||||
|
"output_type": "stream",
|
||||||
|
"text": [
|
||||||
|
"\n",
|
||||||
|
"运动项目信息:\n",
|
||||||
|
"{'包永': {'台阶指数': {'成绩': '65.0 分', '得分': 4, 'date': datetime.date(2021, 9, 15)}, '身高': {'成绩': '174.7 厘米', '得分': None, 'date': datetime.date(2021, 9, 15)}, '体重': {'成绩': '73.6 千克', '得分': 5, 'date': datetime.date(2021, 9, 15)}, '肺活量': {'成绩': '3812.0 毫升', '得分': 4, 'date': datetime.date(2021, 9, 15)}, '握力': {'成绩': '51.0 千克', '得分': 4, 'date': datetime.date(2021, 9, 15)}, '单脚站立': {'成绩': '13.2 秒', '得分': 3, 'date': datetime.date(2021, 9, 15)}, '坐位体前屈': {'成绩': '20.0 厘米', '得分': 5, 'date': datetime.date(2021, 9, 15)}, '选择反应时': {'成绩': '0.554 秒', '得分': 3, 'date': datetime.date(2021, 9, 15)}, '俯卧撑': {'成绩': '39.0 次', '得分': 5, 'date': datetime.date(2021, 9, 15)}, '纵跳': {'成绩': '38.4 厘米', '得分': 4, 'date': datetime.date(2021, 9, 15)}}}\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"import pymysql\n",
|
||||||
|
"import json\n",
|
||||||
|
"filename = 'item.json'\n",
|
||||||
|
"item = {}\n",
|
||||||
|
"unit = {}\n",
|
||||||
|
"with open(filename,'r') as fl:\n",
|
||||||
|
" dict1 = json.load(fl) \n",
|
||||||
|
"for k,v in dict1.items():\n",
|
||||||
|
" item[k] = v\n",
|
||||||
|
"user_id = 5\n",
|
||||||
|
"place_id =120\n",
|
||||||
|
"user = '包永'\n",
|
||||||
|
"db = pymysql.connect(\"localhost\",\"root\",\"songyi\",\"ydyb\" )\n",
|
||||||
|
"cursor = db.cursor()\n",
|
||||||
|
"sql = f'SELECT a.item_id,a.performance,a.score,a.date FROM places_result AS a WHERE a.place_id={place_id} AND a.avatar_id={user_id}'\n",
|
||||||
|
"cursor.execute(sql)\n",
|
||||||
|
"re_ta = {}\n",
|
||||||
|
"dict1 = {}\n",
|
||||||
|
"print(\"\\n运动项目信息:\")\n",
|
||||||
|
"results = cursor.fetchall()\n",
|
||||||
|
"for result in results:\n",
|
||||||
|
" re_ta.setdefault(user,{})\n",
|
||||||
|
" m_item = str(result[0])\n",
|
||||||
|
" dict1.setdefault(item[m_item]['name'],{})\n",
|
||||||
|
" score = result[1]/item[m_item]['divisor']\n",
|
||||||
|
" dict1[item[m_item]['name']]['成绩'] =f'{score} {item[m_item][\"unit\"]}'\n",
|
||||||
|
" dict1[item[m_item]['name']]['得分'] =result[2]\n",
|
||||||
|
" dict1[item[m_item]['name']]['date'] =result[3]\n",
|
||||||
|
" re_ta[user] = dict1\n",
|
||||||
|
"\n",
|
||||||
|
"print(re_ta)\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "43cc57b0-aebc-4315-b48f-9268e754bebb",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## 读取体测报告信息"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
"id": "bfed373e-500d-4618-8344-9b8ddd0c5e8c",
|
"id": "5ac5e20c-c836-4ea4-a62c-acafbdb636e0",
|
||||||
|
"metadata": {
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"import pdfplumber\n",
|
||||||
|
"\n",
|
||||||
|
"# 读取 PDF 文档\n",
|
||||||
|
"pdf = pdfplumber.open(\"5.pdf\")\n",
|
||||||
|
"\n",
|
||||||
|
"# 获取页数\n",
|
||||||
|
"print(\"总页数:\",len(pdf.pages))\n",
|
||||||
|
"print(\"-----------------------------------------\")\n",
|
||||||
|
"\n",
|
||||||
|
"# 读取第 4 页;索引从 1 开始\n",
|
||||||
|
"page = pdf.pages[1] \n",
|
||||||
|
"print(\"本页:\",page.page_number + 1)\n",
|
||||||
|
"print(\"-----------------------------------------\")\n",
|
||||||
|
"text = page.extract_text()\n",
|
||||||
|
"#for s in text:\n",
|
||||||
|
"# print(s)\n",
|
||||||
|
"print(text)\n",
|
||||||
|
"print(text.split('\\n'))"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "957b1771-7da1-4ecd-a2b8-889c288b2789",
|
||||||
|
"metadata": {
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"import pdfplumber\n",
|
||||||
|
"import pymysql\n",
|
||||||
|
"\"\"\"获取人员测试成绩\"\"\"\n",
|
||||||
|
"user_id = 5\n",
|
||||||
|
"place_id =120\n",
|
||||||
|
"db = pymysql.connect(\"localhost\",\"root\",\"songyi\",\"ydyb\" )\n",
|
||||||
|
"cursor = db.cursor()\n",
|
||||||
|
"sql = f'SELECT a.item_id,a.performance,a.score,a.date FROM places_result AS a WHERE a.place_id={place_id} AND a.avatar_id={user_id}'\n",
|
||||||
|
"cursor.execute(sql)\n",
|
||||||
|
"re_ta = {}\n",
|
||||||
|
"print(\"\\n运动项目信息:\")\n",
|
||||||
|
"results = cursor.fetchall()\n",
|
||||||
|
"for result in results:\n",
|
||||||
|
"# print (\"%d--%s\" %(result[0],result[1]))\n",
|
||||||
|
" re_ta[result[0]] = result[1]\n",
|
||||||
|
"\n",
|
||||||
|
"dict1 = {}\n",
|
||||||
|
"\n",
|
||||||
|
"# 读取 PDF 文档\n",
|
||||||
|
"pdf = pdfplumber.open(\"5.pdf\")\n",
|
||||||
|
"\n",
|
||||||
|
"# 获取页数\n",
|
||||||
|
"num = len(pdf.pages)\n",
|
||||||
|
"page = pdf.pages[0] \n",
|
||||||
|
"text = page.extract_text()\n",
|
||||||
|
"dict1['name'] = text.split('\\n')[2]\n",
|
||||||
|
"dict1['sn'] = text.split('\\n')[4]\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"print(dict1)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "81b0babc-5da8-43b2-b81a-61db0e7e301b",
|
||||||
|
"metadata": {
|
||||||
|
"execution": {
|
||||||
|
"iopub.execute_input": "2021-10-12T13:21:30.438009Z",
|
||||||
|
"iopub.status.busy": "2021-10-12T13:21:30.437074Z",
|
||||||
|
"iopub.status.idle": "2021-10-12T13:21:30.449886Z",
|
||||||
|
"shell.execute_reply": "2021-10-12T13:21:30.447584Z",
|
||||||
|
"shell.execute_reply.started": "2021-10-12T13:21:30.437900Z"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"## 体测项目信息"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 91,
|
||||||
|
"id": "6531259c-9727-44f7-9ec3-d6dbe9b76987",
|
||||||
|
"metadata": {
|
||||||
|
"execution": {
|
||||||
|
"iopub.execute_input": "2021-10-12T14:49:29.798699Z",
|
||||||
|
"iopub.status.busy": "2021-10-12T14:49:29.797765Z",
|
||||||
|
"iopub.status.idle": "2021-10-12T14:49:29.861989Z",
|
||||||
|
"shell.execute_reply": "2021-10-12T14:49:29.859902Z",
|
||||||
|
"shell.execute_reply.started": "2021-10-12T14:49:29.798590Z"
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "stdout",
|
||||||
|
"output_type": "stream",
|
||||||
|
"text": [
|
||||||
|
"1 {'name': '肺活量', 'unit': '毫升', 'divisor': 1}\n",
|
||||||
|
"2 {'name': '握力', 'unit': '千克', 'divisor': 1000}\n",
|
||||||
|
"3 {'name': '坐位体前屈', 'unit': '厘米', 'divisor': 10}\n",
|
||||||
|
"4 {'name': '纵跳', 'unit': '厘米', 'divisor': 10}\n",
|
||||||
|
"5 {'name': '俯卧撑', 'unit': '次', 'divisor': 1}\n",
|
||||||
|
"6 {'name': '单脚站立', 'unit': '秒', 'divisor': 1000}\n",
|
||||||
|
"7 {'name': '选择反应时', 'unit': '秒', 'divisor': 1000}\n",
|
||||||
|
"8 {'name': '台阶指数', 'unit': '分', 'divisor': 10}\n",
|
||||||
|
"9 {'name': '一分钟仰卧起坐', 'unit': '次', 'divisor': 1}\n",
|
||||||
|
"10 {'name': '身高', 'unit': '厘米', 'divisor': 10}\n",
|
||||||
|
"11 {'name': '体重', 'unit': '千克', 'divisor': 1000}\n",
|
||||||
|
"12 {'name': '立定跳远', 'unit': '厘米', 'divisor': 10}\n",
|
||||||
|
"13 {'name': '网球掷远', 'unit': '米', 'divisor': 1000}\n",
|
||||||
|
"14 {'name': '双脚连续跳', 'unit': '秒', 'divisor': 1000}\n",
|
||||||
|
"15 {'name': '10米折返跑', 'unit': '秒', 'divisor': 1000}\n",
|
||||||
|
"16 {'name': '走平衡木', 'unit': '秒', 'divisor': 1000}\n",
|
||||||
|
"17 {'name': '50米跑', 'unit': '秒', 'divisor': 1000}\n",
|
||||||
|
"18 {'name': '一分钟跳绳', 'unit': '次', 'divisor': 1}\n",
|
||||||
|
"19 {'name': '50米*8往返跑', 'unit': '秒', 'divisor': 1000}\n",
|
||||||
|
"20 {'name': '高压', 'unit': 'mmHg', 'divisor': 1}\n",
|
||||||
|
"21 {'name': '低压', 'unit': 'mmHg', 'divisor': 1}\n",
|
||||||
|
"22 {'name': '心率', 'unit': '次', 'divisor': 1}\n",
|
||||||
|
"23 {'name': '长跑', 'unit': '秒', 'divisor': 1000}\n",
|
||||||
|
"24 {'name': '引体向上', 'unit': '次', 'divisor': 1}\n",
|
||||||
|
"27 {'name': '实心球', 'unit': '米', 'divisor': 1000}\n",
|
||||||
|
"28 {'name': '篮球运球', 'unit': '秒', 'divisor': 1000}\n",
|
||||||
|
"29 {'name': '足球运球', 'unit': '秒', 'divisor': 1000}\n",
|
||||||
|
"30 {'name': '足球垫球', 'unit': '次', 'divisor': 1}\n",
|
||||||
|
"31 {'name': '排球垫球', 'unit': '次', 'divisor': 1}\n",
|
||||||
|
"32 {'name': '25米×2往返跑', 'unit': '秒', 'divisor': 1000}\n",
|
||||||
|
"33 {'name': '左右眼视力', 'unit': '分', 'divisor': 10}\n",
|
||||||
|
"34 {'name': '测试', 'unit': '毫升', 'divisor': 1}\n",
|
||||||
|
"37 {'name': '跪卧撑', 'unit': '次', 'divisor': 1}\n",
|
||||||
|
"38 {'name': '功率车', 'unit': '毫升/千克/分钟', 'divisor': 10}\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"import pymysql\n",
|
||||||
|
"import json\n",
|
||||||
|
"\n",
|
||||||
|
"db = pymysql.connect(\"localhost\",\"root\",\"songyi\",\"ydyb\" )\n",
|
||||||
|
"cursor = db.cursor()\n",
|
||||||
|
"sql = \"SELECT a.id,a.name, b.name,b.divisor FROM items AS a,items_unit AS b WHERE a.unit_id = b.id\"\n",
|
||||||
|
"cursor.execute(sql)\n",
|
||||||
|
"dict1 = {}\n",
|
||||||
|
"\n",
|
||||||
|
"results = cursor.fetchall()\n",
|
||||||
|
"for result in results:\n",
|
||||||
|
"# print (\"%d--%s\" %(result[0],result[1]))\n",
|
||||||
|
" item = {}\n",
|
||||||
|
" id = result[0]\n",
|
||||||
|
" dict1.setdefault(id,{})\n",
|
||||||
|
" item['name'] = result[1]\n",
|
||||||
|
" item['unit'] = result[2]\n",
|
||||||
|
" item['divisor'] = result[3]\n",
|
||||||
|
" dict1[id] = item\n",
|
||||||
|
"filename = 'item.json'\n",
|
||||||
|
"with open(filename,'w') as fl:\n",
|
||||||
|
" json.dump(dict1, fl,ensure_ascii=False) \n",
|
||||||
|
"with open(filename,'r') as fl:\n",
|
||||||
|
" dict1 = json.load(fl) \n",
|
||||||
|
"for k,v in dict1.items():\n",
|
||||||
|
" print(k,v)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 80,
|
||||||
|
"id": "9af74d66-b410-4fbf-afcd-9884174e6841",
|
||||||
|
"metadata": {
|
||||||
|
"execution": {
|
||||||
|
"iopub.execute_input": "2021-10-12T14:35:04.928544Z",
|
||||||
|
"iopub.status.busy": "2021-10-12T14:35:04.927553Z",
|
||||||
|
"iopub.status.idle": "2021-10-12T14:35:04.945489Z",
|
||||||
|
"shell.execute_reply": "2021-10-12T14:35:04.943664Z",
|
||||||
|
"shell.execute_reply.started": "2021-10-12T14:35:04.928432Z"
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "stdout",
|
||||||
|
"output_type": "stream",
|
||||||
|
"text": [
|
||||||
|
"{'name': '肺活量', 'unit': '毫升', 'divisor': 1, 'info': '肺活量(vital capacity)是指在最大吸气后尽力呼气的气量。包括潮气量、补吸气量和补呼气量三部分。潮气量是指一次呼吸周期中肺吸量或呼出的气量,在潮气量之外再吸入的最大气量为补吸气量,在潮气量之外再呼出的最最大量为补呼气量,最大呼气后残留在肺内的气量为余气量。\\r\\n肺活量与人的呼吸密切相关。生理学研究表明:人体的各器官、系统、组织、细胞每时每刻都在消耗氧,机体只有在氧供应充足的情况下才能正常工作。人体内部的氧供给全部靠肺的呼吸来获得,在呼吸过程中,肺不仅要摄入氧气,还要将体内代谢出的二氧化碳排出。\\r\\n可以这样认为:肺是机体气体交换的中转站,这个中转站的容积大小直接决定着每次呼吸气体交换的量,这是检测肺功能的最直观、也是最客观的指标。'}\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"import json\n",
|
||||||
|
"filename = 'item.json'\n",
|
||||||
|
"item = {}\n",
|
||||||
|
"with open(filename,'r') as fl:\n",
|
||||||
|
" dict1 = json.load(fl) \n",
|
||||||
|
"for k,v in dict1.items():\n",
|
||||||
|
" item[k] = v\n",
|
||||||
|
"print(item['1'])"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "1ccab0f2-448b-4423-ae21-aa1c0f6470da",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": []
|
"source": []
|
||||||
|
|||||||
Reference in new issue
Block a user