Skip to content

Commit d1f2a58

Browse files
Merge pull request #172 from coding-for-reproducible-research/add-names-to-course-history
Add names to historical course list
2 parents 5c4b36e + 6f88f5e commit d1f2a58

File tree

2 files changed

+56
-61
lines changed

2 files changed

+56
-61
lines changed

cfrr_program_details/courses_overview.ipynb

Lines changed: 34 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
{
1212
"cell_type": "code",
13-
"execution_count": 6,
13+
"execution_count": 4,
1414
"id": "d3aa7606-0f50-4f05-b104-ad4521c80406",
1515
"metadata": {
1616
"editable": true,
@@ -25,9 +25,9 @@
2525
{
2626
"data": {
2727
"text/markdown": [
28-
"- Introduction to Python: 23rd/30th October 10am-1pm (online only) - [MS Form Signup](https://forms.office.com/Pages/ResponsePage.aspx?id=d10qkZj77k6vMhM02PBKU-3R4SvRoClNrKjEX5qG1X1UNDJFN1NaRlk0UkpLNjVDSTM2TlM0NlpPWS4u)\n",
29-
"- Introduction to R: 8th/15th/22nd October 1-4pm (online only) - [MS Form Signup](https://forms.office.com/Pages/ResponsePage.aspx?id=d10qkZj77k6vMhM02PBKU-3R4SvRoClNrKjEX5qG1X1UQjJCSzFWQjNVSldGRFhDUDNXVjdBQjNZSi4u)\n",
30-
"- Regression Analysis with R: 25th October 10am-1pm (online only) - [MS Form Signup](https://forms.office.com/Pages/ResponsePage.aspx?id=d10qkZj77k6vMhM02PBKU-3R4SvRoClNrKjEX5qG1X1UMU1KRUpEOFRJQjFEOVVUVzFDMTRQMFZLRi4u)"
28+
"- Python for Data Analysis: 29th November/6th December 10am-1pm (In-person only) - [MS Form Signup](https://forms.office.com/e/ChUMbgntbr)\n",
29+
"- Regression Analysis with R: 25th October 10am-1pm (online only) - [MS Form Signup](https://forms.office.com/Pages/ResponsePage.aspx?id=d10qkZj77k6vMhM02PBKU-3R4SvRoClNrKjEX5qG1X1UMU1KRUpEOFRJQjFEOVVUVzFDMTRQMFZLRi4u)\n",
30+
"- Working with Data in R: 18th/25th November 1-4pm (online only) - [MS Form Signup](https://forms.office.com/e/zi5g1uP5sB)"
3131
],
3232
"text/plain": [
3333
"<IPython.core.display.Markdown object>"
@@ -89,7 +89,7 @@
8989
},
9090
{
9191
"cell_type": "code",
92-
"execution_count": 4,
92+
"execution_count": 6,
9393
"id": "0a814add-f545-4663-8b06-39c40b636509",
9494
"metadata": {
9595
"editable": true,
@@ -102,40 +102,31 @@
102102
},
103103
"outputs": [
104104
{
105-
"data": {
106-
"text/html": [
107-
"\n",
108-
"<table style='width: 100%; text-align: center; border: 1px solid black; border-collapse: collapse;'>\n",
109-
"<tr>\n",
110-
"<th>Course Name</th>\n",
111-
"<th>Course Info</th>\n",
112-
"</tr>\n",
113-
"<tr><td>Regression Analysis with R</td><td>June 2024</td></tr>\n",
114-
"<tr><td>Introduction to MATLAB</td><td>June 2024</td></tr>\n",
115-
"<tr><td>Parallel Computing </td><td>June 2024</td></tr>\n",
116-
"<tr><td>Introduction to R</td><td>June 2024</td></tr>\n",
117-
"<tr><td>Intermediate Version Control</td><td>May 2024</td></tr>\n",
118-
"<tr><td>Python for Data Analysis</td><td>May 2024</td></tr>\n",
119-
"<tr><td>Introduction to Version Control</td><td>May 2024</td></tr>\n",
120-
"<tr><td>Advanced Regression Analysis with R</td><td>April 2024</td></tr>\n",
121-
"<tr><td>Software Development Best Practice</td><td>April 2024</td></tr>\n",
122-
"<tr><td>Computational Thinking</td><td>April 2024</td></tr>\n",
123-
"<tr><td>Introduction to Python</td><td>April 2024</td></tr>\n",
124-
"<tr><td>Introduction to UNIX </td><td>March 2024</td></tr>\n",
125-
"<tr><td>Regression Analysis with R</td><td>January 2024</td></tr>\n",
126-
"<tr><td>Introduction to R</td><td>January 2024</td></tr>\n",
127-
"<tr><td>Introduction to Version Control</td><td>December 2023</td></tr>\n",
128-
"<tr><td>Introduction to HPC and ISCA</td><td>November 2023</td></tr>\n",
129-
"<tr><td>Introduction to julia</td><td>November/December 2023</td></tr>\n",
130-
"<tr><td>Introduction to Python</td><td>November 2023</td></tr>\n",
131-
"<tr><td>Introduction to UNIX </td><td>October 2023</td></tr></table>"
132-
],
133-
"text/plain": [
134-
"<IPython.core.display.HTML object>"
135-
]
136-
},
137-
"metadata": {},
138-
"output_type": "display_data"
105+
"ename": "KeyError",
106+
"evalue": "'Course Developers'",
107+
"output_type": "error",
108+
"traceback": [
109+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
110+
"\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
111+
"File \u001b[0;32m~/miniconda3/envs/CfRR/lib/python3.9/site-packages/pandas/core/indexes/base.py:3805\u001b[0m, in \u001b[0;36mIndex.get_loc\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 3804\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-> 3805\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_engine\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget_loc\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcasted_key\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 3806\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mKeyError\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m err:\n",
112+
"File \u001b[0;32mindex.pyx:167\u001b[0m, in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc\u001b[0;34m()\u001b[0m\n",
113+
"File \u001b[0;32mindex.pyx:196\u001b[0m, in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc\u001b[0;34m()\u001b[0m\n",
114+
"File \u001b[0;32mpandas/_libs/hashtable_class_helper.pxi:7081\u001b[0m, in \u001b[0;36mpandas._libs.hashtable.PyObjectHashTable.get_item\u001b[0;34m()\u001b[0m\n",
115+
"File \u001b[0;32mpandas/_libs/hashtable_class_helper.pxi:7089\u001b[0m, in \u001b[0;36mpandas._libs.hashtable.PyObjectHashTable.get_item\u001b[0;34m()\u001b[0m\n",
116+
"\u001b[0;31mKeyError\u001b[0m: 'Course Developers'",
117+
"\nThe above exception was the direct cause of the following exception:\n",
118+
"\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
119+
"Cell \u001b[0;32mIn[6], line 29\u001b[0m\n\u001b[1;32m 17\u001b[0m html_table_header \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\"\"\u001b[39m\n\u001b[1;32m 18\u001b[0m \u001b[38;5;124m<table style=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mwidth: 100\u001b[39m\u001b[38;5;124m%\u001b[39m\u001b[38;5;124m; text-align: center; border: 1px solid black; border-collapse: collapse;\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m>\u001b[39m\n\u001b[1;32m 19\u001b[0m \u001b[38;5;124m<tr>\u001b[39m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 25\u001b[0m \u001b[38;5;124m</tr>\u001b[39m\n\u001b[1;32m 26\u001b[0m \u001b[38;5;124m\"\"\"\u001b[39m\n\u001b[1;32m 28\u001b[0m \u001b[38;5;66;03m# Apply the function and create the HTML table rows\u001b[39;00m\n\u001b[0;32m---> 29\u001b[0m table_rows \u001b[38;5;241m=\u001b[39m \u001b[43mprevious_courses_df\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mapply\u001b[49m\u001b[43m(\u001b[49m\u001b[43mgenerate_html_row\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43maxis\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;241;43m1\u001b[39;49m\u001b[43m)\u001b[49m\u001b[38;5;241m.\u001b[39mtolist()\n\u001b[1;32m 31\u001b[0m \u001b[38;5;66;03m# Join the table rows into a single block\u001b[39;00m\n\u001b[1;32m 32\u001b[0m html_table \u001b[38;5;241m=\u001b[39m html_table_header \u001b[38;5;241m+\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(table_rows) \u001b[38;5;241m+\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m</table>\u001b[39m\u001b[38;5;124m\"\u001b[39m\n",
120+
"File \u001b[0;32m~/miniconda3/envs/CfRR/lib/python3.9/site-packages/pandas/core/frame.py:10374\u001b[0m, in \u001b[0;36mDataFrame.apply\u001b[0;34m(self, func, axis, raw, result_type, args, by_row, engine, engine_kwargs, **kwargs)\u001b[0m\n\u001b[1;32m 10360\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mpandas\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcore\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mapply\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m frame_apply\n\u001b[1;32m 10362\u001b[0m op \u001b[38;5;241m=\u001b[39m frame_apply(\n\u001b[1;32m 10363\u001b[0m \u001b[38;5;28mself\u001b[39m,\n\u001b[1;32m 10364\u001b[0m func\u001b[38;5;241m=\u001b[39mfunc,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 10372\u001b[0m kwargs\u001b[38;5;241m=\u001b[39mkwargs,\n\u001b[1;32m 10373\u001b[0m )\n\u001b[0;32m> 10374\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mop\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mapply\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241m.\u001b[39m__finalize__(\u001b[38;5;28mself\u001b[39m, method\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mapply\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n",
121+
"File \u001b[0;32m~/miniconda3/envs/CfRR/lib/python3.9/site-packages/pandas/core/apply.py:916\u001b[0m, in \u001b[0;36mFrameApply.apply\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 913\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mraw:\n\u001b[1;32m 914\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mapply_raw(engine\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mengine, engine_kwargs\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mengine_kwargs)\n\u001b[0;32m--> 916\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mapply_standard\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n",
122+
"File \u001b[0;32m~/miniconda3/envs/CfRR/lib/python3.9/site-packages/pandas/core/apply.py:1063\u001b[0m, in \u001b[0;36mFrameApply.apply_standard\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 1061\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mapply_standard\u001b[39m(\u001b[38;5;28mself\u001b[39m):\n\u001b[1;32m 1062\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mengine \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mpython\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[0;32m-> 1063\u001b[0m results, res_index \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mapply_series_generator\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1064\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 1065\u001b[0m results, res_index \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mapply_series_numba()\n",
123+
"File \u001b[0;32m~/miniconda3/envs/CfRR/lib/python3.9/site-packages/pandas/core/apply.py:1081\u001b[0m, in \u001b[0;36mFrameApply.apply_series_generator\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 1078\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m option_context(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mmode.chained_assignment\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;28;01mNone\u001b[39;00m):\n\u001b[1;32m 1079\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m i, v \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28menumerate\u001b[39m(series_gen):\n\u001b[1;32m 1080\u001b[0m \u001b[38;5;66;03m# ignore SettingWithCopy here in case the user mutates\u001b[39;00m\n\u001b[0;32m-> 1081\u001b[0m results[i] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfunc\u001b[49m\u001b[43m(\u001b[49m\u001b[43mv\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1082\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(results[i], ABCSeries):\n\u001b[1;32m 1083\u001b[0m \u001b[38;5;66;03m# If we have a view on v, we need to make a copy because\u001b[39;00m\n\u001b[1;32m 1084\u001b[0m \u001b[38;5;66;03m# series_generator will swap out the underlying data\u001b[39;00m\n\u001b[1;32m 1085\u001b[0m results[i] \u001b[38;5;241m=\u001b[39m results[i]\u001b[38;5;241m.\u001b[39mcopy(deep\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mFalse\u001b[39;00m)\n",
124+
"Cell \u001b[0;32mIn[6], line 14\u001b[0m, in \u001b[0;36mgenerate_html_row\u001b[0;34m(row)\u001b[0m\n\u001b[1;32m 13\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mgenerate_html_row\u001b[39m(row):\n\u001b[0;32m---> 14\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m<tr><td>\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mrow[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mCourse Name\u001b[39m\u001b[38;5;124m'\u001b[39m]\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m</td><td>\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mrow[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mCourse Info\u001b[39m\u001b[38;5;124m'\u001b[39m]\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m</td><td>\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mrow[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mCourse Leader\u001b[39m\u001b[38;5;124m'\u001b[39m]\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m</td><td>\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mrow[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mCourse Helpers\u001b[39m\u001b[38;5;124m'\u001b[39m]\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m</td><td>\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mrow[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mCourse Developers\u001b[39m\u001b[38;5;124m'\u001b[39m]\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m</td></tr>\u001b[39m\u001b[38;5;124m\"\u001b[39m\n",
125+
"File \u001b[0;32m~/miniconda3/envs/CfRR/lib/python3.9/site-packages/pandas/core/series.py:1121\u001b[0m, in \u001b[0;36mSeries.__getitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 1118\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_values[key]\n\u001b[1;32m 1120\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m key_is_scalar:\n\u001b[0;32m-> 1121\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_get_value\u001b[49m\u001b[43m(\u001b[49m\u001b[43mkey\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1123\u001b[0m \u001b[38;5;66;03m# Convert generator to list before going through hashable part\u001b[39;00m\n\u001b[1;32m 1124\u001b[0m \u001b[38;5;66;03m# (We will iterate through the generator there to check for slices)\u001b[39;00m\n\u001b[1;32m 1125\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m is_iterator(key):\n",
126+
"File \u001b[0;32m~/miniconda3/envs/CfRR/lib/python3.9/site-packages/pandas/core/series.py:1237\u001b[0m, in \u001b[0;36mSeries._get_value\u001b[0;34m(self, label, takeable)\u001b[0m\n\u001b[1;32m 1234\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_values[label]\n\u001b[1;32m 1236\u001b[0m \u001b[38;5;66;03m# Similar to Index.get_value, but we do not fall back to positional\u001b[39;00m\n\u001b[0;32m-> 1237\u001b[0m loc \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mindex\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget_loc\u001b[49m\u001b[43m(\u001b[49m\u001b[43mlabel\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1239\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m is_integer(loc):\n\u001b[1;32m 1240\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_values[loc]\n",
127+
"File \u001b[0;32m~/miniconda3/envs/CfRR/lib/python3.9/site-packages/pandas/core/indexes/base.py:3812\u001b[0m, in \u001b[0;36mIndex.get_loc\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 3807\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(casted_key, \u001b[38;5;28mslice\u001b[39m) \u001b[38;5;129;01mor\u001b[39;00m (\n\u001b[1;32m 3808\u001b[0m \u001b[38;5;28misinstance\u001b[39m(casted_key, abc\u001b[38;5;241m.\u001b[39mIterable)\n\u001b[1;32m 3809\u001b[0m \u001b[38;5;129;01mand\u001b[39;00m \u001b[38;5;28many\u001b[39m(\u001b[38;5;28misinstance\u001b[39m(x, \u001b[38;5;28mslice\u001b[39m) \u001b[38;5;28;01mfor\u001b[39;00m x \u001b[38;5;129;01min\u001b[39;00m casted_key)\n\u001b[1;32m 3810\u001b[0m ):\n\u001b[1;32m 3811\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m InvalidIndexError(key)\n\u001b[0;32m-> 3812\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mKeyError\u001b[39;00m(key) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01merr\u001b[39;00m\n\u001b[1;32m 3813\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mTypeError\u001b[39;00m:\n\u001b[1;32m 3814\u001b[0m \u001b[38;5;66;03m# If we have a listlike key, _check_indexing_error will raise\u001b[39;00m\n\u001b[1;32m 3815\u001b[0m \u001b[38;5;66;03m# InvalidIndexError. Otherwise we fall through and re-raise\u001b[39;00m\n\u001b[1;32m 3816\u001b[0m \u001b[38;5;66;03m# the TypeError.\u001b[39;00m\n\u001b[1;32m 3817\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_check_indexing_error(key)\n",
128+
"\u001b[0;31mKeyError\u001b[0m: 'Course Developers'"
129+
]
139130
}
140131
],
141132
"source": [
@@ -153,9 +144,9 @@
153144
"# Function to generate an HTML table row for each course\n",
154145
"def generate_html_row(row):\n",
155146
" #return f\"<tr><td>{row['Course Name']}</td><td>{row['Course Info']}</td><td>{row['Course Leader']}</td><td>{row['Course Helpers']}</td><td>{row['Course Developers']}</td></tr>\"\n",
156-
" return f\"<tr><td>{row['Course Name']}</td><td>{row['Course Info']}</td></tr>\"\n",
147+
" return f\"<tr><td>{row['Course Name']}</td><td>{row['Course Info']}</td><td>{row['Course Leader']}</td><td>{row['Course Helpers']}</td></tr>\"\n",
157148
"\n",
158-
"# Generate HTML table header\n",
149+
"#Generate HTML table header\n",
159150
"# html_table_header = \"\"\"\n",
160151
"# <table style='width: 100%; text-align: center; border: 1px solid black; border-collapse: collapse;'>\n",
161152
"# <tr>\n",
@@ -171,6 +162,8 @@
171162
"<tr>\n",
172163
"<th>Course Name</th>\n",
173164
"<th>Course Info</th>\n",
165+
"<th>Course Leader</th>\n",
166+
"<th>Course Helpers</th>\n",
174167
"</tr>\n",
175168
"\"\"\"\n",
176169
"\n",

0 commit comments

Comments
 (0)