Commit b45adbe2 authored by Maria Marin's avatar Maria Marin

Update total diseases analysis.ipynb

parent 296cf508
......@@ -288,7 +288,7 @@
"df = pd.DataFrame(columns=[\"ID\", \"Drugs\", \"Dc_mean\", \"Dc_std\"])\n",
"\n",
"# empty file in which I will add the results\n",
"with open(\"Rand_closest_distance_rand.csv\", 'w', newline='') as file:\n",
"with open(\"Closest_distance_rand.csv\", 'w', newline='') as file:\n",
" writer = csv.writer(file)\n",
" writer.writerow([\"ID\", \"Drugs\", \"Dc_mean\", \"Dc_std\"])\n",
"\n",
......@@ -305,7 +305,7 @@
" for _, row in proximity_rand.iterrows():\n",
" results.append({\"ID\": dis, \"Drugs\": row[\"Drugs\"], \"Dc_mean\": row[\"dc_mean\"], \"Dc_std\": row[\"dc_std\"]})\n",
" \n",
" with open(\"Rand_closest_distance_rand.csv\", 'a', newline='') as file:\n",
" with open(\"Closest_distance_rand.csv\", 'a', newline='') as file:\n",
" writer = csv.writer(file)\n",
" for result in results:\n",
" writer.writerow([result[\"ID\"], result[\"Drugs\"], result[\"Dc_mean\"], result[\"Dc_std\"]])\n"
......@@ -318,7 +318,7 @@
"metadata": {},
"outputs": [],
"source": [
"rand_prox = pd.read_csv(\"Rand_closest_distance_rand.csv\", sep = \",\")"
"rand_prox = pd.read_csv(\"Closest_distance_rand.csv\", sep = \",\")"
]
},
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment