This commit is contained in:
512song committed 2024-08-28 22:46:30 +08:00
1 parent 11a1e51802
commit 724bf28fbf
12 files changed
+708 -446

No files matched your search

+73 -7
View File
@@ -506,15 +506,15 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 17,
"id": "a51a346c-8a3a-425c-be76-940f11c2e1ab",
"metadata": {
"execution": {
"iopub.execute_input": "2024-08-03T14:02:17.514754Z",
"iopub.status.busy": "2024-08-03T14:02:17.514034Z",
"iopub.status.idle": "2024-08-03T14:02:17.581525Z",
"shell.execute_reply": "2024-08-03T14:02:17.580974Z",
"shell.execute_reply.started": "2024-08-03T14:02:17.514688Z"
"iopub.execute_input": "2024-08-11T11:10:50.265674Z",
"iopub.status.busy": "2024-08-11T11:10:50.265079Z",
"iopub.status.idle": "2024-08-11T11:10:50.339113Z",
"shell.execute_reply": "2024-08-11T11:10:50.338550Z",
"shell.execute_reply.started": "2024-08-11T11:10:50.265618Z"
}
},
"outputs": [
@@ -585,12 +585,78 @@
" dict1[bh]['name'] = name\n",
" dict1[bh]['sex'] = sex\n",
" dict1[bh]['age'] = age\n",
" dict1[bh]['phone'] = phone\n",
" dict1[bh]['psy'] = psy\n",
" dict1[bh]['tcm'] = tcm\n",
" dict1[bh]['spine'] = spine\n",
" bh += 1 \n",
" #list3.append(list2)\n",
"filename = 'data/积家基础数据240801.json'\n",
"filename = 'data/积家基础数据240811.json'\n",
"\n",
"with open(filename,'w') as fl:\n",
" json.dump(dict1, fl, ensure_ascii=False) \n",
"print(len(dict1))"
]
},
{
"cell_type": "markdown",
"id": "ca5240cb-4ae1-4c40-ad7a-40b620dcf072",
"metadata": {},
"source": [
"## 清理无手机号码人员"
]
},
{
"cell_type": "code",
"execution_count": 20,
"id": "8a339d2f-0869-45c8-93e6-79bd6ed0e86f",
"metadata": {
"execution": {
"iopub.execute_input": "2024-08-11T11:22:06.868752Z",
"iopub.status.busy": "2024-08-11T11:22:06.868034Z",
"iopub.status.idle": "2024-08-11T11:22:06.881380Z",
"shell.execute_reply": "2024-08-11T11:22:06.880194Z",
"shell.execute_reply.started": "2024-08-11T11:22:06.868690Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"3\n",
"5\n",
"6\n",
"8\n",
"10\n",
"11\n",
"13\n",
"14\n",
"15\n",
"19\n",
"20\n",
"21\n",
"22\n",
"23\n",
"24\n",
"25\n",
"26\n",
"27\n",
"30\n",
"38\n",
"38\n"
]
}
],
"source": [
"filename = 'data/积家基础数据240811.json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl) \n",
"for k,v in dict1.items():\n",
" if v['phone'] =='18801062497':\n",
" del v['phone']\n",
" print(k)\n",
"filename = 'data/积家基础数据2408.json'\n",
"\n",
"with open(filename,'w') as fl:\n",
" json.dump(dict1, fl, ensure_ascii=False) \n",