Skip to content
Open
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
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
"workbench.colorTheme": "Visual Studio Dark",
"workbench.fontAliasing": "antialiased",
"workbench.statusBar.visible": true
}
}
205 changes: 205 additions & 0 deletions notebooks/.ipynb_checkpoints/02_03b-checkpoint.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Data Filtering and Selection"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "acd063a4",
"metadata": {},
"outputs": [
{
"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"
]
}
],
"source": [
"!pip install numpy\n",
"!pip install pandas"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "0b48db56-f3a4-47b5-998e-37d64588ae49",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"\n",
"from pandas import DataFrame"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "bbba446d",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>column 1</th>\n",
" <th>column 2</th>\n",
" <th>column 3</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>row 1</th>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>6</td>\n",
" </tr>\n",
" <tr>\n",
" <th>row 2</th>\n",
" <td>9</td>\n",
" <td>12</td>\n",
" <td>15</td>\n",
" </tr>\n",
" <tr>\n",
" <th>row 3</th>\n",
" <td>18</td>\n",
" <td>21</td>\n",
" <td>24</td>\n",
" </tr>\n",
" <tr>\n",
" <th>row 4</th>\n",
" <td>27</td>\n",
" <td>30</td>\n",
" <td>33</td>\n",
" </tr>\n",
" <tr>\n",
" <th>row 5</th>\n",
" <td>36</td>\n",
" <td>39</td>\n",
" <td>42</td>\n",
" </tr>\n",
" <tr>\n",
" <th>row 6</th>\n",
" <td>45</td>\n",
" <td>48</td>\n",
" <td>51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>row 7</th>\n",
" <td>54</td>\n",
" <td>57</td>\n",
" <td>60</td>\n",
" </tr>\n",
" <tr>\n",
" <th>row 8</th>\n",
" <td>63</td>\n",
" <td>66</td>\n",
" <td>69</td>\n",
" </tr>\n",
" <tr>\n",
" <th>row 9</th>\n",
" <td>72</td>\n",
" <td>75</td>\n",
" <td>78</td>\n",
" </tr>\n",
" <tr>\n",
" <th>row 10</th>\n",
" <td>81</td>\n",
" <td>84</td>\n",
" <td>87</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" column 1 column 2 column 3\n",
"row 1 0 3 6\n",
"row 2 9 12 15\n",
"row 3 18 21 24\n",
"row 4 27 30 33\n",
"row 5 36 39 42\n",
"row 6 45 48 51\n",
"row 7 54 57 60\n",
"row 8 63 66 69\n",
"row 9 72 75 78\n",
"row 10 81 84 87"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"numbers_df = DataFrame(np.arange(0,90,3).reshape(10,3), index = ['row 1','row 2','row 3','row 4','row 5','row 6','row 7','row 8','row 9','row 10'],columns=['column 1','column 2','column 3'])\n",
"numbers_df"
]
},
{
"cell_type": "markdown",
"id": "68b700fd-5320-47e2-852c-a13aab49a486",
"metadata": {},
"source": [
"#### Comparison operators (> < = <= => == !=) and Masking."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.8"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
54 changes: 54 additions & 0 deletions notebooks/.ipynb_checkpoints/02_04b-checkpoint.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "c9327e33-5afa-4ffb-aca9-6bdc963ef9ff",
"metadata": {},
"source": [
"## Working with Missing Data in Pandas"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "5be0cfbf-e779-42b3-8bd6-f3dd46888ebb",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"\n",
"from pandas import DataFrame"
]
},
{
"cell_type": "markdown",
"id": "61bbc7e0-5198-4609-a66a-d4b437606dac",
"metadata": {},
"source": [
"### Filling missing values using fillna(), replace() and interpolate()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.8"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
52 changes: 52 additions & 0 deletions notebooks/.ipynb_checkpoints/02_05b-checkpoint.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"\n",
"from pandas import Series, DataFrame"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Removing duplicates"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
73 changes: 73 additions & 0 deletions notebooks/.ipynb_checkpoints/02_06b-checkpoint.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"\n",
"from pandas import Series, DataFrame"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Concatenating data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Transforming data\n",
"#### Dropping data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Adding data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Sorting data"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
Loading