Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/scripts/clean_kernelspecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,20 @@
import glob

for nb_path in glob.glob("**/*.ipynb", recursive=True):
with open(nb_path) as f:
nb = nbformat.read(f, as_version=4)
with open(nb_path, encoding = "utf-8") as f:
print(nb_path)
try:
nb = nbformat.read(f, as_version=4)

except Exception as e:
print(e)
continue

nb['metadata']['kernelspec'] = {
"name": "python3",
"display_name": "Python 3",
"language": "python"
}
with open(nb_path, 'w') as f:
with open(nb_path, 'w', encoding = "utf-8") as f:
nbformat.write(nb, f)

2 changes: 1 addition & 1 deletion practicals_jn_book/week_1/finalbook_part1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@
"\n",
"### Assignment 5\n",
"\n",
"- **First sort all the data by Totalkg score, make sure the Totalkg is on top of your DataFrame. Print out the DataFrame. What do you notice?**\n",
"- **First sort all the data by Totalkg score, make sure the lowest Totalkg is on top of your DataFrame. Print out the DataFrame. What do you notice?**\n",
"\n",
"- **Remove all rows that contain missing values. Print out the DataFrame. What happened to the index?**\n",
"\n",
Expand Down
Loading
Loading