diff --git a/00_python_in_a_nutshell/00_content_arithmetic.ipynb b/00_python_in_a_nutshell/00_content_arithmetic.ipynb
index 3a27936..4b71d10 100644
--- a/00_python_in_a_nutshell/00_content_arithmetic.ipynb
+++ b/00_python_in_a_nutshell/00_content_arithmetic.ipynb
@@ -536,9 +536,9 @@
],
"metadata": {
"kernelspec": {
- "display_name": "Python 3 (ipykernel)",
+ "display_name": "intro-to-data-science",
"language": "python",
- "name": "python3"
+ "name": "intro-to-data-science"
},
"language_info": {
"codemirror_mode": {
@@ -550,7 +550,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.8.12"
+ "version": "3.12.4"
},
"toc": {
"base_numbering": 1,
diff --git a/00_python_in_a_nutshell/01_exercises_calculator.ipynb b/00_python_in_a_nutshell/01_exercises_calculator.ipynb
index 758aa47..5dbbfaf 100644
--- a/00_python_in_a_nutshell/01_exercises_calculator.ipynb
+++ b/00_python_in_a_nutshell/01_exercises_calculator.ipynb
@@ -149,9 +149,9 @@
],
"metadata": {
"kernelspec": {
- "display_name": "Python 3 (ipykernel)",
+ "display_name": "intro-to-data-science",
"language": "python",
- "name": "python3"
+ "name": "intro-to-data-science"
},
"language_info": {
"codemirror_mode": {
@@ -163,7 +163,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.8.12"
+ "version": "3.12.4"
},
"toc": {
"base_numbering": 1,
diff --git a/00_python_in_a_nutshell/02_content_logic.ipynb b/00_python_in_a_nutshell/02_content_logic.ipynb
index c40c754..32ab209 100644
--- a/00_python_in_a_nutshell/02_content_logic.ipynb
+++ b/00_python_in_a_nutshell/02_content_logic.ipynb
@@ -507,7 +507,7 @@
"\n",
"The indented line constitues the `for`-loop's body. In the example, we simply take each of the numbers in `numbers`, one at a time, and add it to a `total` that is initialized at `0`. In other words, we calculate the sum of all the elements in `numbers`.\n",
"\n",
- "Many beginners struggle with the term \"loop.\" To visualize the looping behavior of this code, we use the online tool [PythonTutor ](http://pythontutor.com/visualize.html#code=numbers%20%3D%20%5B1,%202,%203,%204%5D%0A%0Atotal%20%3D%200%0A%0Afor%20number%20in%20numbers%3A%0A%20%20%20%20total%20%3D%20total%20%2B%20number%0A%0Atotal&cumulative=false&curInstr=0&heapPrimitives=nevernest&mode=display&origin=opt-frontend.js&py=3&rawInputLstJSON=%5B%5D&textReferences=false). That tool is helpful for two reasons:\n",
+ "Many beginners struggle with the term \"loop.\" To visualize the looping behavior of this code, we use the online tool [PythonTutor ](http://pythontutor.com/visualize.html#code=numbers%20%3D%20%5B1,%202,%203,%204%5D%0A%0Atotal%20%3D%200%0A%0Afor%20number%20in%20numbers%3A%0A%20%20%20%20total%20%3D%20total%20%2B%20number%0A%0Atotal&cumulative=false&curstr=0&heapPrimitives=nevernest&mode=display&origin=opt-frontend.js&py=3&rawInputLstJSON=%5B%5D&textReferences=false). That tool is helpful for two reasons:\n",
"1. It allows us to execute code in \"slow motion\" (i.e., by clicking the \"next\" button on the left side, only the next atomic step of the code snippet is executed).\n",
"2. It shows what happens inside the computer's memory on the right-hand side."
]
@@ -999,9 +999,9 @@
],
"metadata": {
"kernelspec": {
- "display_name": "Python 3 (ipykernel)",
+ "display_name": "intro-to-data-science",
"language": "python",
- "name": "python3"
+ "name": "intro-to-data-science"
},
"language_info": {
"codemirror_mode": {
@@ -1013,7 +1013,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.8.12"
+ "version": "3.12.4"
},
"toc": {
"base_numbering": 1,
diff --git a/00_python_in_a_nutshell/03_exercises_loops.ipynb b/00_python_in_a_nutshell/03_exercises_loops.ipynb
index 58fc7ad..46670ec 100644
--- a/00_python_in_a_nutshell/03_exercises_loops.ipynb
+++ b/00_python_in_a_nutshell/03_exercises_loops.ipynb
@@ -178,9 +178,9 @@
],
"metadata": {
"kernelspec": {
- "display_name": "Python 3 (ipykernel)",
+ "display_name": "intro-to-data-science",
"language": "python",
- "name": "python3"
+ "name": "intro-to-data-science"
},
"language_info": {
"codemirror_mode": {
@@ -192,7 +192,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.8.12"
+ "version": "3.12.4"
},
"toc": {
"base_numbering": 1,
diff --git a/00_python_in_a_nutshell/04_exercises_fizz_buzz.ipynb b/00_python_in_a_nutshell/04_exercises_fizz_buzz.ipynb
index 57df84f..3b5e5ab 100644
--- a/00_python_in_a_nutshell/04_exercises_fizz_buzz.ipynb
+++ b/00_python_in_a_nutshell/04_exercises_fizz_buzz.ipynb
@@ -112,9 +112,9 @@
],
"metadata": {
"kernelspec": {
- "display_name": "Python 3 (ipykernel)",
+ "display_name": "intro-to-data-science",
"language": "python",
- "name": "python3"
+ "name": "intro-to-data-science"
},
"language_info": {
"codemirror_mode": {
@@ -126,7 +126,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.8.12"
+ "version": "3.12.4"
},
"toc": {
"base_numbering": 1,
diff --git a/00_python_in_a_nutshell/05_content_functions.ipynb b/00_python_in_a_nutshell/05_content_functions.ipynb
index 7961934..27c40fa 100644
--- a/00_python_in_a_nutshell/05_content_functions.ipynb
+++ b/00_python_in_a_nutshell/05_content_functions.ipynb
@@ -73,7 +73,7 @@
"\n",
"Let's execute the function with `numbers` as the input. We see the same `6` below the cell as we do above where we run the code without a function. Without the `return` statement in the function's body, we would not see any output here.\n",
"\n",
- "To see what happens in detail, take a look at [PythonTutor ](https://pythontutor.com/visualize.html#code=numbers%20%3D%20%5B1,%202,%203,%204%5D%0A%0Adef%20add_evens%28numbers%29%3A%0A%20%20%20%20%22%22%22Sum%20up%20all%20the%20even%20numbers%20in%20a%20list.%22%22%22%0A%20%20%20%20result%20%3D%200%0A%0A%20%20%20%20for%20number%20in%20numbers%3A%0A%20%20%20%20%20%20%20%20if%20number%20%25%202%20%3D%3D%200%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20result%20%3D%20result%20%2B%20number%0A%0A%20%20%20%20return%20result%0A%0Atotal%20%3D%20add_evens%28numbers%29&cumulative=false&curInstr=0&heapPrimitives=nevernest&mode=display&origin=opt-frontend.js&py=3&rawInputLstJSON=%5B%5D&textReferences=false) again. You should notice how there are two variables by the name `numbers` in memory. Python manages the memory with a concept called **namespaces** or **scopes**, which are just fancy terms for saying that Python can tell variables from different contexts apart."
+ "To see what happens in detail, take a look at [PythonTutor ](https://pythontutor.com/visualize.html#code=numbers%20%3D%20%5B1,%202,%203,%204%5D%0A%0Adef%20add_evens%28numbers%29%3A%0A%20%20%20%20%22%22%22Sum%20up%20all%20the%20even%20numbers%20in%20a%20list.%22%22%22%0A%20%20%20%20result%20%3D%200%0A%0A%20%20%20%20for%20number%20in%20numbers%3A%0A%20%20%20%20%20%20%20%20if%20number%20%25%202%20%3D%3D%200%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20result%20%3D%20result%20%2B%20number%0A%0A%20%20%20%20return%20result%0A%0Atotal%20%3D%20add_evens%28numbers%29&cumulative=false&curstr=0&heapPrimitives=nevernest&mode=display&origin=opt-frontend.js&py=3&rawInputLstJSON=%5B%5D&textReferences=false) again. You should notice how there are two variables by the name `numbers` in memory. Python manages the memory with a concept called **namespaces** or **scopes**, which are just fancy terms for saying that Python can tell variables from different contexts apart."
]
},
{
@@ -151,7 +151,7 @@
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
- "\u001b[0;32m/tmp/user/1000/ipykernel_707190/1049141082.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mresult\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
+ "Cell \u001b[0;32mIn[5], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mresult\u001b[49m\n",
"\u001b[0;31mNameError\u001b[0m: name 'result' is not defined"
]
}
@@ -505,9 +505,9 @@
],
"metadata": {
"kernelspec": {
- "display_name": "Python 3 (ipykernel)",
+ "display_name": "intro-to-data-science",
"language": "python",
- "name": "python3"
+ "name": "intro-to-data-science"
},
"language_info": {
"codemirror_mode": {
@@ -519,7 +519,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.8.12"
+ "version": "3.12.4"
},
"toc": {
"base_numbering": 1,
diff --git a/00_python_in_a_nutshell/06_exercises_volume.ipynb b/00_python_in_a_nutshell/06_exercises_volume.ipynb
index ded4b96..e50152e 100644
--- a/00_python_in_a_nutshell/06_exercises_volume.ipynb
+++ b/00_python_in_a_nutshell/06_exercises_volume.ipynb
@@ -257,9 +257,9 @@
],
"metadata": {
"kernelspec": {
- "display_name": "Python 3 (ipykernel)",
+ "display_name": "intro-to-data-science",
"language": "python",
- "name": "python3"
+ "name": "intro-to-data-science"
},
"language_info": {
"codemirror_mode": {
@@ -271,7 +271,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.8.12"
+ "version": "3.12.4"
},
"toc": {
"base_numbering": 1,
diff --git a/00_python_in_a_nutshell/07_content_data_types.ipynb b/00_python_in_a_nutshell/07_content_data_types.ipynb
index a40af42..2ac1470 100644
--- a/00_python_in_a_nutshell/07_content_data_types.ipynb
+++ b/00_python_in_a_nutshell/07_content_data_types.ipynb
@@ -237,19 +237,18 @@
"metadata": {},
"outputs": [
{
- "ename": "AttributeError",
- "evalue": "'int' object has no attribute 'is_integer'",
- "output_type": "error",
- "traceback": [
- "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
- "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)",
- "\u001b[0;32m/tmp/user/1000/ipykernel_306555/2418692311.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0ma\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mis_integer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
- "\u001b[0;31mAttributeError\u001b[0m: 'int' object has no attribute 'is_integer'"
- ]
+ "data": {
+ "text/plain": [
+ "True"
+ ]
+ },
+ "execution_count": 9,
+ "metadata": {},
+ "output_type": "execute_result"
}
],
"source": [
- "a.is_integer()"
+ "a.is_integer() # Note: In Python versions < 3.12 this cell raises an `AttributeError`"
]
},
{
@@ -494,7 +493,7 @@
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)",
- "\u001b[0;32m/tmp/user/1000/ipykernel_306555/2667408552.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mmore_numbers\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m10\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
+ "Cell \u001b[0;32mIn[21], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mmore_numbers\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mappend\u001b[49m(\u001b[38;5;241m10\u001b[39m)\n",
"\u001b[0;31mAttributeError\u001b[0m: 'tuple' object has no attribute 'append'"
]
}
@@ -607,7 +606,7 @@
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
- "\u001b[0;32m/tmp/user/1000/ipykernel_306555/3320204082.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mto_words\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"zero\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
+ "Cell \u001b[0;32mIn[26], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mto_words\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mzero\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\n",
"\u001b[0;31mKeyError\u001b[0m: 'zero'"
]
}
@@ -673,9 +672,9 @@
],
"metadata": {
"kernelspec": {
- "display_name": "Python 3 (ipykernel)",
+ "display_name": "intro-to-data-science",
"language": "python",
- "name": "python3"
+ "name": "intro-to-data-science"
},
"language_info": {
"codemirror_mode": {
@@ -687,7 +686,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.8.12"
+ "version": "3.12.4"
},
"toc": {
"base_numbering": 1,
diff --git a/01_scientific_stack/00_content_numpy.ipynb b/01_scientific_stack/00_content_numpy.ipynb
index 1872760..b11a41f 100644
--- a/01_scientific_stack/00_content_numpy.ipynb
+++ b/01_scientific_stack/00_content_numpy.ipynb
@@ -50,8 +50,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "Requirement already satisfied: numpy in /home/webartifex/repos/intro-to-data-science/.venv/lib/python3.8/site-packages (1.21.1)\n",
- "Note: you may need to restart the kernel to use updated packages.\n"
+ "Requirement already satisfied: numpy in /home/instructor/Repositories/intro-to-data-science/.venv/lib/python3.12/site-packages (2.0.0)\n"
]
}
],
@@ -68,15 +67,17 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "Requirement already satisfied: matplotlib in /home/webartifex/repos/intro-to-data-science/.venv/lib/python3.8/site-packages (3.4.3)\n",
- "Requirement already satisfied: python-dateutil>=2.7 in /home/webartifex/repos/intro-to-data-science/.venv/lib/python3.8/site-packages (from matplotlib) (2.8.2)\n",
- "Requirement already satisfied: cycler>=0.10 in /home/webartifex/repos/intro-to-data-science/.venv/lib/python3.8/site-packages (from matplotlib) (0.10.0)\n",
- "Requirement already satisfied: pyparsing>=2.2.1 in /home/webartifex/repos/intro-to-data-science/.venv/lib/python3.8/site-packages (from matplotlib) (2.4.7)\n",
- "Requirement already satisfied: kiwisolver>=1.0.1 in /home/webartifex/repos/intro-to-data-science/.venv/lib/python3.8/site-packages (from matplotlib) (1.3.2)\n",
- "Requirement already satisfied: pillow>=6.2.0 in /home/webartifex/repos/intro-to-data-science/.venv/lib/python3.8/site-packages (from matplotlib) (8.3.2)\n",
- "Requirement already satisfied: numpy>=1.16 in /home/webartifex/repos/intro-to-data-science/.venv/lib/python3.8/site-packages (from matplotlib) (1.21.1)\n",
- "Requirement already satisfied: six in /home/webartifex/repos/intro-to-data-science/.venv/lib/python3.8/site-packages (from cycler>=0.10->matplotlib) (1.16.0)\n",
- "Note: you may need to restart the kernel to use updated packages.\n"
+ "Requirement already satisfied: matplotlib in /home/instructor/Repositories/intro-to-data-science/.venv/lib/python3.12/site-packages (3.9.1)\n",
+ "Requirement already satisfied: contourpy>=1.0.1 in /home/instructor/Repositories/intro-to-data-science/.venv/lib/python3.12/site-packages (from matplotlib) (1.2.1)\n",
+ "Requirement already satisfied: cycler>=0.10 in /home/instructor/Repositories/intro-to-data-science/.venv/lib/python3.12/site-packages (from matplotlib) (0.12.1)\n",
+ "Requirement already satisfied: fonttools>=4.22.0 in /home/instructor/Repositories/intro-to-data-science/.venv/lib/python3.12/site-packages (from matplotlib) (4.53.1)\n",
+ "Requirement already satisfied: kiwisolver>=1.3.1 in /home/instructor/Repositories/intro-to-data-science/.venv/lib/python3.12/site-packages (from matplotlib) (1.4.5)\n",
+ "Requirement already satisfied: numpy>=1.23 in /home/instructor/Repositories/intro-to-data-science/.venv/lib/python3.12/site-packages (from matplotlib) (2.0.0)\n",
+ "Requirement already satisfied: packaging>=20.0 in /home/instructor/Repositories/intro-to-data-science/.venv/lib/python3.12/site-packages (from matplotlib) (24.1)\n",
+ "Requirement already satisfied: pillow>=8 in /home/instructor/Repositories/intro-to-data-science/.venv/lib/python3.12/site-packages (from matplotlib) (10.4.0)\n",
+ "Requirement already satisfied: pyparsing>=2.3.1 in /home/instructor/Repositories/intro-to-data-science/.venv/lib/python3.12/site-packages (from matplotlib) (3.1.2)\n",
+ "Requirement already satisfied: python-dateutil>=2.7 in /home/instructor/Repositories/intro-to-data-science/.venv/lib/python3.12/site-packages (from matplotlib) (2.9.0.post0)\n",
+ "Requirement already satisfied: six>=1.5 in /home/instructor/Repositories/intro-to-data-science/.venv/lib/python3.12/site-packages (from python-dateutil>=2.7->matplotlib) (1.16.0)\n"
]
}
],
@@ -368,8 +369,7 @@
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
- "\u001b[0;32m/tmp/user/1000/ipykernel_1264563/568665770.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdot\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mv1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mm1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
- "\u001b[0;32m<__array_function__ internals>\u001b[0m in \u001b[0;36mdot\u001b[0;34m(*args, **kwargs)\u001b[0m\n",
+ "Cell \u001b[0;32mIn[12], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mnp\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdot\u001b[49m\u001b[43m(\u001b[49m\u001b[43mv1\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mm1\u001b[49m\u001b[43m)\u001b[49m\n",
"\u001b[0;31mValueError\u001b[0m: shapes (5,) and (2,5) not aligned: 5 (dim 0) != 2 (dim 0)"
]
}
@@ -429,7 +429,7 @@
{
"data": {
"text/plain": [
- "1"
+ "np.int64(1)"
]
},
"execution_count": 14,
@@ -449,7 +449,7 @@
{
"data": {
"text/plain": [
- "5"
+ "np.int64(5)"
]
},
"execution_count": 15,
@@ -779,7 +779,7 @@
{
"data": {
"text/plain": [
- "6"
+ "np.int64(6)"
]
},
"execution_count": 28,
@@ -1062,7 +1062,7 @@
{
"data": {
"text/plain": [
- "1"
+ "np.int64(1)"
]
},
"execution_count": 39,
@@ -1215,9 +1215,7 @@
"