Skip to content

Commit

Permalink
Fix thrown exception caused by empty data
Browse files Browse the repository at this point in the history
  • Loading branch information
JohT committed Dec 10, 2024
1 parent 2aea5d9 commit 549034b
Showing 1 changed file with 31 additions and 28 deletions.
59 changes: 31 additions & 28 deletions jupyter/PathFindingTypescript.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "d19447e1",
"metadata": {},
"outputs": [],
Expand All @@ -116,7 +116,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"id": "807bba03",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -146,7 +146,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"id": "648e2a5a",
"metadata": {},
"outputs": [],
Expand All @@ -157,7 +157,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"id": "e49ca888",
"metadata": {},
"outputs": [],
Expand All @@ -168,7 +168,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"id": "1c5dab37",
"metadata": {},
"outputs": [],
Expand All @@ -183,7 +183,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"id": "c1db254b",
"metadata": {},
"outputs": [],
Expand All @@ -195,7 +195,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"id": "59310f6f",
"metadata": {},
"outputs": [],
Expand All @@ -207,7 +207,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"id": "7d2e62d6",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -242,7 +242,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": null,
"id": "3f2e905c",
"metadata": {},
"outputs": [],
Expand All @@ -258,7 +258,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": null,
"id": "d2d60597",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -291,7 +291,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": null,
"id": "5ef848fd",
"metadata": {},
"outputs": [],
Expand All @@ -310,7 +310,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": null,
"id": "e84f2736",
"metadata": {},
"outputs": [],
Expand All @@ -333,7 +333,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": null,
"id": "036264ca",
"metadata": {},
"outputs": [],
Expand All @@ -351,6 +351,9 @@
" Contains the path algorithm result including the columns \"distance\", \"pairCount\" and the chosen column parameter.\n",
" \"\"\"\n",
"\n",
" if data_frame.empty:\n",
" return empty_projection_result()\n",
" \n",
" data_frame = data_frame.copy()\n",
"\n",
" # If not already grouped, group by the given column and the distance and sum up the pair count (=number of paths)\n",
Expand All @@ -375,7 +378,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": null,
"id": "de2e71ce",
"metadata": {},
"outputs": [],
Expand All @@ -393,7 +396,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": null,
"id": "27a583e9",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -435,7 +438,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": null,
"id": "e63ddc97",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -487,7 +490,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": null,
"id": "7243fbfd",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -532,7 +535,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": null,
"id": "5262a4ea",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -580,7 +583,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": null,
"id": "6afb912b",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -619,7 +622,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": null,
"id": "40653fe5",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -685,7 +688,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": null,
"id": "1ecc41b1",
"metadata": {},
"outputs": [],
Expand All @@ -699,7 +702,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": null,
"id": "0b637ce2",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -739,7 +742,7 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": null,
"id": "62f50f28",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -920,7 +923,7 @@
},
{
"cell_type": "code",
"execution_count": 34,
"execution_count": null,
"id": "7b90cfbc",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -1054,7 +1057,7 @@
},
{
"cell_type": "code",
"execution_count": 41,
"execution_count": null,
"id": "64f86f9d",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -1139,7 +1142,7 @@
},
{
"cell_type": "code",
"execution_count": 45,
"execution_count": null,
"id": "8b43628b",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -1320,7 +1323,7 @@
},
{
"cell_type": "code",
"execution_count": 54,
"execution_count": null,
"id": "47bd1a08",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -1450,7 +1453,7 @@
},
{
"cell_type": "code",
"execution_count": 61,
"execution_count": null,
"id": "f70894c2",
"metadata": {},
"outputs": [],
Expand Down

0 comments on commit 549034b

Please sign in to comment.