diff --git a/notebooks/02_03b.ipynb b/notebooks/02_03b.ipynb index ebef0a1..e191379 100644 --- a/notebooks/02_03b.ipynb +++ b/notebooks/02_03b.ipynb @@ -9,7 +9,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 1, "id": "acd063a4", "metadata": {}, "outputs": [ @@ -17,19 +17,13 @@ "name": "stdout", "output_type": "stream", "text": [ - "Requirement already satisfied: numpy in /home/codespace/.local/lib/python3.10/site-packages (1.26.1)\n", - "\n", - "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.3\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m23.3.1\u001b[0m\n", - "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpython -m pip install --upgrade pip\u001b[0m\n", - "Requirement already satisfied: pandas in /home/codespace/.local/lib/python3.10/site-packages (2.1.1)\n", - "Requirement already satisfied: numpy>=1.22.4 in /home/codespace/.local/lib/python3.10/site-packages (from pandas) (1.26.1)\n", - "Requirement already satisfied: python-dateutil>=2.8.2 in /home/codespace/.local/lib/python3.10/site-packages (from pandas) (2.8.2)\n", - "Requirement already satisfied: pytz>=2020.1 in /home/codespace/.local/lib/python3.10/site-packages (from pandas) (2023.3.post1)\n", - "Requirement already satisfied: tzdata>=2022.1 in /home/codespace/.local/lib/python3.10/site-packages (from pandas) (2023.3)\n", - "Requirement already satisfied: six>=1.5 in /home/codespace/.local/lib/python3.10/site-packages (from python-dateutil>=2.8.2->pandas) (1.16.0)\n", - "\n", - "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.3\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m23.3.1\u001b[0m\n", - "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpython -m pip install --upgrade pip\u001b[0m\n" + "Requirement already satisfied: numpy in /home/codespace/.local/lib/python3.10/site-packages (1.26.4)\n", + "Requirement already satisfied: pandas in /home/codespace/.local/lib/python3.10/site-packages (2.2.2)\n", + "Requirement already satisfied: numpy>=1.22.4 in /home/codespace/.local/lib/python3.10/site-packages (from pandas) (1.26.4)\n", + "Requirement already satisfied: python-dateutil>=2.8.2 in /home/codespace/.local/lib/python3.10/site-packages (from pandas) (2.9.0.post0)\n", + "Requirement already satisfied: pytz>=2020.1 in /home/codespace/.local/lib/python3.10/site-packages (from pandas) (2024.1)\n", + "Requirement already satisfied: tzdata>=2022.7 in /home/codespace/.local/lib/python3.10/site-packages (from pandas) (2024.1)\n", + "Requirement already satisfied: six>=1.5 in /home/codespace/.local/lib/python3.10/site-packages (from python-dateutil>=2.8.2->pandas) (1.16.0)\n" ] } ], @@ -40,7 +34,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "id": "0b48db56-f3a4-47b5-998e-37d64588ae49", "metadata": {}, "outputs": [], @@ -53,7 +47,149 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 4, + "id": "1d55678f", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
01234
002468
11012141618
22022242628
33032343638
44042444648
55052545658
66062646668
77072747678
88082848688
\n", + "
" + ], + "text/plain": [ + " 0 1 2 3 4\n", + "0 0 2 4 6 8\n", + "1 10 12 14 16 18\n", + "2 20 22 24 26 28\n", + "3 30 32 34 36 38\n", + "4 40 42 44 46 48\n", + "5 50 52 54 56 58\n", + "6 60 62 64 66 68\n", + "7 70 72 74 76 78\n", + "8 80 82 84 86 88" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "numbers_lala = DataFrame(np.arange(0,90,2).reshape(9,5))\n", + "numbers_lala" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8ad6a8be", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 6, "id": "bbba446d", "metadata": {}, "outputs": [ @@ -162,7 +298,7 @@ "row 10 81 84 87" ] }, - "execution_count": 13, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -172,6 +308,27 @@ "numbers_df" ] }, + { + "cell_type": "code", + "execution_count": 7, + "id": "06cd5049", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "3" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "numbers_df.iloc[0,1] # locating the item with index" + ] + }, { "cell_type": "markdown", "id": "68b700fd-5320-47e2-852c-a13aab49a486", @@ -179,6 +336,14 @@ "source": [ "#### Comparison operators (> < = <= => == !=) and Masking." ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "132d9059", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -197,7 +362,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.8" + "version": "3.10.13" } }, "nbformat": 4,