MsSaidat25 commited on
Commit
ee6a74b
·
1 Parent(s): d498e1c

Created using Colab

Browse files
Files changed (1) hide show
  1. Machine learning Workshop.ipynb +1706 -0
Machine learning Workshop.ipynb ADDED
@@ -0,0 +1,1706 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "nbformat": 4,
3
+ "nbformat_minor": 0,
4
+ "metadata": {
5
+ "colab": {
6
+ "provenance": [],
7
+ "authorship_tag": "ABX9TyOanFyooUUWZniR03cv72o+",
8
+ "include_colab_link": true
9
+ },
10
+ "kernelspec": {
11
+ "name": "python3",
12
+ "display_name": "Python 3"
13
+ },
14
+ "language_info": {
15
+ "name": "python"
16
+ }
17
+ },
18
+ "cells": [
19
+ {
20
+ "cell_type": "markdown",
21
+ "metadata": {
22
+ "id": "view-in-github",
23
+ "colab_type": "text"
24
+ },
25
+ "source": [
26
+ "<a href=\"https://colab.research.google.com/github/MsSaidat25/AI-Engineer-Projects/blob/main/Machine%20learning%20Workshop.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
27
+ ]
28
+ },
29
+ {
30
+ "cell_type": "code",
31
+ "execution_count": 1,
32
+ "metadata": {
33
+ "colab": {
34
+ "base_uri": "https://localhost:8080/"
35
+ },
36
+ "id": "cMIjQEwLJPKQ",
37
+ "outputId": "c3c64dff-48e9-4dab-e007-fc9cf25753e9"
38
+ },
39
+ "outputs": [
40
+ {
41
+ "output_type": "stream",
42
+ "name": "stdout",
43
+ "text": [
44
+ "Cloning into 'The-Machine-Learning-Workshop'...\n",
45
+ "remote: Enumerating objects: 805, done.\u001b[K\n",
46
+ "remote: Counting objects: 100% (23/23), done.\u001b[K\n",
47
+ "remote: Compressing objects: 100% (15/15), done.\u001b[K\n",
48
+ "remote: Total 805 (delta 15), reused 8 (delta 8), pack-reused 782 (from 1)\u001b[K\n",
49
+ "Receiving objects: 100% (805/805), 10.36 MiB | 9.64 MiB/s, done.\n",
50
+ "Resolving deltas: 100% (293/293), done.\n"
51
+ ]
52
+ }
53
+ ],
54
+ "source": [
55
+ "!git clone https://github.com/MsSaidat25/The-Machine-Learning-Workshop.git"
56
+ ]
57
+ },
58
+ {
59
+ "cell_type": "code",
60
+ "source": [
61
+ "import os\n",
62
+ "os.chdir('/content/The-Machine-Learning-Workshop')\n",
63
+ "!ls # see all folders/files"
64
+ ],
65
+ "metadata": {
66
+ "colab": {
67
+ "base_uri": "https://localhost:8080/"
68
+ },
69
+ "id": "fkumve32Jj-w",
70
+ "outputId": "f5f0c473-b4c3-4e25-b4e9-23db465582c1"
71
+ },
72
+ "execution_count": 2,
73
+ "outputs": [
74
+ {
75
+ "output_type": "stream",
76
+ "name": "stdout",
77
+ "text": [
78
+ "Chapter01 Chapter03 Chapter05 Graphics README.md\n",
79
+ "Chapter02 Chapter04 Chapter06 LICENSE requirements.txt\n"
80
+ ]
81
+ }
82
+ ]
83
+ },
84
+ {
85
+ "cell_type": "code",
86
+ "metadata": {
87
+ "colab": {
88
+ "base_uri": "https://localhost:8080/"
89
+ },
90
+ "id": "8a5d3702",
91
+ "outputId": "312c313b-b695-48a4-e9f6-cad0ad63f4f9"
92
+ },
93
+ "source": [
94
+ "import os\n",
95
+ "os.chdir('/content/The-Machine-Learning-Workshop/Chapter01')\n",
96
+ "!ls"
97
+ ],
98
+ "execution_count": 4,
99
+ "outputs": [
100
+ {
101
+ "output_type": "stream",
102
+ "name": "stdout",
103
+ "text": [
104
+ "Activity1.01 Exercise1.01 Exercise1.03\n",
105
+ "Activity1.02 Exercise1.02 Exercise1.04\n"
106
+ ]
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "cell_type": "code",
112
+ "metadata": {
113
+ "colab": {
114
+ "base_uri": "https://localhost:8080/"
115
+ },
116
+ "id": "99014702",
117
+ "outputId": "a7833725-7b7b-4655-8a28-5f0898678ede"
118
+ },
119
+ "source": [
120
+ "import json\n",
121
+ "\n",
122
+ "notebook_path = '/content/The-Machine-Learning-Workshop/Chapter01/Activity1.01/Activity1_01.ipynb'\n",
123
+ "\n",
124
+ "with open(notebook_path, 'r') as f:\n",
125
+ " notebook_content = json.load(f)\n",
126
+ "\n",
127
+ "cells_to_generate = []\n",
128
+ "for cell in notebook_content['cells']:\n",
129
+ " if cell['cell_type'] == 'code':\n",
130
+ " cells_to_generate.append({'cell_type': 'python', 'code': ''.join(cell['source'])})\n",
131
+ " elif cell['cell_type'] == 'markdown':\n",
132
+ " cells_to_generate.append({'cell_type': 'markdown', 'code': ''.join(cell['source'])})\n",
133
+ "\n",
134
+ "# This list will be used by the next command to generate the actual cells.\n",
135
+ "# For now, I will just print the first few cells to confirm the parsing.\n",
136
+ "print(f\"Found {len(cells_to_generate)} cells in the notebook. Preview of the first cell:\\n{cells_to_generate[0]['code'] if cells_to_generate else 'No cells found.'}\")"
137
+ ],
138
+ "execution_count": 8,
139
+ "outputs": [
140
+ {
141
+ "output_type": "stream",
142
+ "name": "stdout",
143
+ "text": [
144
+ "Found 5 cells in the notebook. Preview of the first cell:\n",
145
+ "import seaborn as sns\n",
146
+ "titanic = sns.load_dataset('titanic')\n",
147
+ "titanic.head(10)\n"
148
+ ]
149
+ }
150
+ ]
151
+ },
152
+ {
153
+ "cell_type": "code",
154
+ "metadata": {
155
+ "colab": {
156
+ "base_uri": "https://localhost:8080/"
157
+ },
158
+ "id": "12666191",
159
+ "outputId": "cb746e2f-c18d-4518-88c9-d6e3a401b318"
160
+ },
161
+ "source": [
162
+ "import os\n",
163
+ "os.chdir('/content/The-Machine-Learning-Workshop/Chapter01/Activity1.01')\n",
164
+ "!ls"
165
+ ],
166
+ "execution_count": 5,
167
+ "outputs": [
168
+ {
169
+ "output_type": "stream",
170
+ "name": "stdout",
171
+ "text": [
172
+ "Activity1_01.ipynb titanic.csv unit_test_activity1_01.ipynb\n"
173
+ ]
174
+ }
175
+ ]
176
+ },
177
+ {
178
+ "cell_type": "code",
179
+ "metadata": {
180
+ "colab": {
181
+ "base_uri": "https://localhost:8080/"
182
+ },
183
+ "id": "17425fb5",
184
+ "outputId": "082e27d0-240f-4fd8-da28-828aeda873a8"
185
+ },
186
+ "source": [
187
+ "!cat '/content/The-Machine-Learning-Workshop/Chapter01/Activity1.01/Activity1_01.ipynb'"
188
+ ],
189
+ "execution_count": 7,
190
+ "outputs": [
191
+ {
192
+ "output_type": "stream",
193
+ "name": "stdout",
194
+ "text": [
195
+ "{\n",
196
+ " \"cells\": [\n",
197
+ " {\n",
198
+ " \"cell_type\": \"code\",\n",
199
+ " \"execution_count\": 4,\n",
200
+ " \"metadata\": {},\n",
201
+ " \"outputs\": [\n",
202
+ " {\n",
203
+ " \"data\": {\n",
204
+ " \"text/html\": [\n",
205
+ " \"<div>\\n\",\n",
206
+ " \"<style scoped>\\n\",\n",
207
+ " \" .dataframe tbody tr th:only-of-type {\\n\",\n",
208
+ " \" vertical-align: middle;\\n\",\n",
209
+ " \" }\\n\",\n",
210
+ " \"\\n\",\n",
211
+ " \" .dataframe tbody tr th {\\n\",\n",
212
+ " \" vertical-align: top;\\n\",\n",
213
+ " \" }\\n\",\n",
214
+ " \"\\n\",\n",
215
+ " \" .dataframe thead th {\\n\",\n",
216
+ " \" text-align: right;\\n\",\n",
217
+ " \" }\\n\",\n",
218
+ " \"</style>\\n\",\n",
219
+ " \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n",
220
+ " \" <thead>\\n\",\n",
221
+ " \" <tr style=\\\"text-align: right;\\\">\\n\",\n",
222
+ " \" <th></th>\\n\",\n",
223
+ " \" <th>survived</th>\\n\",\n",
224
+ " \" <th>pclass</th>\\n\",\n",
225
+ " \" <th>sex</th>\\n\",\n",
226
+ " \" <th>age</th>\\n\",\n",
227
+ " \" <th>sibsp</th>\\n\",\n",
228
+ " \" <th>parch</th>\\n\",\n",
229
+ " \" <th>fare</th>\\n\",\n",
230
+ " \" <th>embarked</th>\\n\",\n",
231
+ " \" <th>class</th>\\n\",\n",
232
+ " \" <th>who</th>\\n\",\n",
233
+ " \" <th>adult_male</th>\\n\",\n",
234
+ " \" <th>deck</th>\\n\",\n",
235
+ " \" <th>embark_town</th>\\n\",\n",
236
+ " \" <th>alive</th>\\n\",\n",
237
+ " \" <th>alone</th>\\n\",\n",
238
+ " \" </tr>\\n\",\n",
239
+ " \" </thead>\\n\",\n",
240
+ " \" <tbody>\\n\",\n",
241
+ " \" <tr>\\n\",\n",
242
+ " \" <th>0</th>\\n\",\n",
243
+ " \" <td>0</td>\\n\",\n",
244
+ " \" <td>3</td>\\n\",\n",
245
+ " \" <td>male</td>\\n\",\n",
246
+ " \" <td>22.0</td>\\n\",\n",
247
+ " \" <td>1</td>\\n\",\n",
248
+ " \" <td>0</td>\\n\",\n",
249
+ " \" <td>7.2500</td>\\n\",\n",
250
+ " \" <td>S</td>\\n\",\n",
251
+ " \" <td>Third</td>\\n\",\n",
252
+ " \" <td>man</td>\\n\",\n",
253
+ " \" <td>True</td>\\n\",\n",
254
+ " \" <td>NaN</td>\\n\",\n",
255
+ " \" <td>Southampton</td>\\n\",\n",
256
+ " \" <td>no</td>\\n\",\n",
257
+ " \" <td>False</td>\\n\",\n",
258
+ " \" </tr>\\n\",\n",
259
+ " \" <tr>\\n\",\n",
260
+ " \" <th>1</th>\\n\",\n",
261
+ " \" <td>1</td>\\n\",\n",
262
+ " \" <td>1</td>\\n\",\n",
263
+ " \" <td>female</td>\\n\",\n",
264
+ " \" <td>38.0</td>\\n\",\n",
265
+ " \" <td>1</td>\\n\",\n",
266
+ " \" <td>0</td>\\n\",\n",
267
+ " \" <td>71.2833</td>\\n\",\n",
268
+ " \" <td>C</td>\\n\",\n",
269
+ " \" <td>First</td>\\n\",\n",
270
+ " \" <td>woman</td>\\n\",\n",
271
+ " \" <td>False</td>\\n\",\n",
272
+ " \" <td>C</td>\\n\",\n",
273
+ " \" <td>Cherbourg</td>\\n\",\n",
274
+ " \" <td>yes</td>\\n\",\n",
275
+ " \" <td>False</td>\\n\",\n",
276
+ " \" </tr>\\n\",\n",
277
+ " \" <tr>\\n\",\n",
278
+ " \" <th>2</th>\\n\",\n",
279
+ " \" <td>1</td>\\n\",\n",
280
+ " \" <td>3</td>\\n\",\n",
281
+ " \" <td>female</td>\\n\",\n",
282
+ " \" <td>26.0</td>\\n\",\n",
283
+ " \" <td>0</td>\\n\",\n",
284
+ " \" <td>0</td>\\n\",\n",
285
+ " \" <td>7.9250</td>\\n\",\n",
286
+ " \" <td>S</td>\\n\",\n",
287
+ " \" <td>Third</td>\\n\",\n",
288
+ " \" <td>woman</td>\\n\",\n",
289
+ " \" <td>False</td>\\n\",\n",
290
+ " \" <td>NaN</td>\\n\",\n",
291
+ " \" <td>Southampton</td>\\n\",\n",
292
+ " \" <td>yes</td>\\n\",\n",
293
+ " \" <td>True</td>\\n\",\n",
294
+ " \" </tr>\\n\",\n",
295
+ " \" <tr>\\n\",\n",
296
+ " \" <th>3</th>\\n\",\n",
297
+ " \" <td>1</td>\\n\",\n",
298
+ " \" <td>1</td>\\n\",\n",
299
+ " \" <td>female</td>\\n\",\n",
300
+ " \" <td>35.0</td>\\n\",\n",
301
+ " \" <td>1</td>\\n\",\n",
302
+ " \" <td>0</td>\\n\",\n",
303
+ " \" <td>53.1000</td>\\n\",\n",
304
+ " \" <td>S</td>\\n\",\n",
305
+ " \" <td>First</td>\\n\",\n",
306
+ " \" <td>woman</td>\\n\",\n",
307
+ " \" <td>False</td>\\n\",\n",
308
+ " \" <td>C</td>\\n\",\n",
309
+ " \" <td>Southampton</td>\\n\",\n",
310
+ " \" <td>yes</td>\\n\",\n",
311
+ " \" <td>False</td>\\n\",\n",
312
+ " \" </tr>\\n\",\n",
313
+ " \" <tr>\\n\",\n",
314
+ " \" <th>4</th>\\n\",\n",
315
+ " \" <td>0</td>\\n\",\n",
316
+ " \" <td>3</td>\\n\",\n",
317
+ " \" <td>male</td>\\n\",\n",
318
+ " \" <td>35.0</td>\\n\",\n",
319
+ " \" <td>0</td>\\n\",\n",
320
+ " \" <td>0</td>\\n\",\n",
321
+ " \" <td>8.0500</td>\\n\",\n",
322
+ " \" <td>S</td>\\n\",\n",
323
+ " \" <td>Third</td>\\n\",\n",
324
+ " \" <td>man</td>\\n\",\n",
325
+ " \" <td>True</td>\\n\",\n",
326
+ " \" <td>NaN</td>\\n\",\n",
327
+ " \" <td>Southampton</td>\\n\",\n",
328
+ " \" <td>no</td>\\n\",\n",
329
+ " \" <td>True</td>\\n\",\n",
330
+ " \" </tr>\\n\",\n",
331
+ " \" <tr>\\n\",\n",
332
+ " \" <th>5</th>\\n\",\n",
333
+ " \" <td>0</td>\\n\",\n",
334
+ " \" <td>3</td>\\n\",\n",
335
+ " \" <td>male</td>\\n\",\n",
336
+ " \" <td>NaN</td>\\n\",\n",
337
+ " \" <td>0</td>\\n\",\n",
338
+ " \" <td>0</td>\\n\",\n",
339
+ " \" <td>8.4583</td>\\n\",\n",
340
+ " \" <td>Q</td>\\n\",\n",
341
+ " \" <td>Third</td>\\n\",\n",
342
+ " \" <td>man</td>\\n\",\n",
343
+ " \" <td>True</td>\\n\",\n",
344
+ " \" <td>NaN</td>\\n\",\n",
345
+ " \" <td>Queenstown</td>\\n\",\n",
346
+ " \" <td>no</td>\\n\",\n",
347
+ " \" <td>True</td>\\n\",\n",
348
+ " \" </tr>\\n\",\n",
349
+ " \" <tr>\\n\",\n",
350
+ " \" <th>6</th>\\n\",\n",
351
+ " \" <td>0</td>\\n\",\n",
352
+ " \" <td>1</td>\\n\",\n",
353
+ " \" <td>male</td>\\n\",\n",
354
+ " \" <td>54.0</td>\\n\",\n",
355
+ " \" <td>0</td>\\n\",\n",
356
+ " \" <td>0</td>\\n\",\n",
357
+ " \" <td>51.8625</td>\\n\",\n",
358
+ " \" <td>S</td>\\n\",\n",
359
+ " \" <td>First</td>\\n\",\n",
360
+ " \" <td>man</td>\\n\",\n",
361
+ " \" <td>True</td>\\n\",\n",
362
+ " \" <td>E</td>\\n\",\n",
363
+ " \" <td>Southampton</td>\\n\",\n",
364
+ " \" <td>no</td>\\n\",\n",
365
+ " \" <td>True</td>\\n\",\n",
366
+ " \" </tr>\\n\",\n",
367
+ " \" <tr>\\n\",\n",
368
+ " \" <th>7</th>\\n\",\n",
369
+ " \" <td>0</td>\\n\",\n",
370
+ " \" <td>3</td>\\n\",\n",
371
+ " \" <td>male</td>\\n\",\n",
372
+ " \" <td>2.0</td>\\n\",\n",
373
+ " \" <td>3</td>\\n\",\n",
374
+ " \" <td>1</td>\\n\",\n",
375
+ " \" <td>21.0750</td>\\n\",\n",
376
+ " \" <td>S</td>\\n\",\n",
377
+ " \" <td>Third</td>\\n\",\n",
378
+ " \" <td>child</td>\\n\",\n",
379
+ " \" <td>False</td>\\n\",\n",
380
+ " \" <td>NaN</td>\\n\",\n",
381
+ " \" <td>Southampton</td>\\n\",\n",
382
+ " \" <td>no</td>\\n\",\n",
383
+ " \" <td>False</td>\\n\",\n",
384
+ " \" </tr>\\n\",\n",
385
+ " \" <tr>\\n\",\n",
386
+ " \" <th>8</th>\\n\",\n",
387
+ " \" <td>1</td>\\n\",\n",
388
+ " \" <td>3</td>\\n\",\n",
389
+ " \" <td>female</td>\\n\",\n",
390
+ " \" <td>27.0</td>\\n\",\n",
391
+ " \" <td>0</td>\\n\",\n",
392
+ " \" <td>2</td>\\n\",\n",
393
+ " \" <td>11.1333</td>\\n\",\n",
394
+ " \" <td>S</td>\\n\",\n",
395
+ " \" <td>Third</td>\\n\",\n",
396
+ " \" <td>woman</td>\\n\",\n",
397
+ " \" <td>False</td>\\n\",\n",
398
+ " \" <td>NaN</td>\\n\",\n",
399
+ " \" <td>Southampton</td>\\n\",\n",
400
+ " \" <td>yes</td>\\n\",\n",
401
+ " \" <td>False</td>\\n\",\n",
402
+ " \" </tr>\\n\",\n",
403
+ " \" <tr>\\n\",\n",
404
+ " \" <th>9</th>\\n\",\n",
405
+ " \" <td>1</td>\\n\",\n",
406
+ " \" <td>2</td>\\n\",\n",
407
+ " \" <td>female</td>\\n\",\n",
408
+ " \" <td>14.0</td>\\n\",\n",
409
+ " \" <td>1</td>\\n\",\n",
410
+ " \" <td>0</td>\\n\",\n",
411
+ " \" <td>30.0708</td>\\n\",\n",
412
+ " \" <td>C</td>\\n\",\n",
413
+ " \" <td>Second</td>\\n\",\n",
414
+ " \" <td>child</td>\\n\",\n",
415
+ " \" <td>False</td>\\n\",\n",
416
+ " \" <td>NaN</td>\\n\",\n",
417
+ " \" <td>Cherbourg</td>\\n\",\n",
418
+ " \" <td>yes</td>\\n\",\n",
419
+ " \" <td>False</td>\\n\",\n",
420
+ " \" </tr>\\n\",\n",
421
+ " \" </tbody>\\n\",\n",
422
+ " \"</table>\\n\",\n",
423
+ " \"</div>\"\n",
424
+ " ],\n",
425
+ " \"text/plain\": [\n",
426
+ " \" survived pclass sex age sibsp parch fare embarked class \\\\\\n\",\n",
427
+ " \"0 0 3 male 22.0 1 0 7.2500 S Third \\n\",\n",
428
+ " \"1 1 1 female 38.0 1 0 71.2833 C First \\n\",\n",
429
+ " \"2 1 3 female 26.0 0 0 7.9250 S Third \\n\",\n",
430
+ " \"3 1 1 female 35.0 1 0 53.1000 S First \\n\",\n",
431
+ " \"4 0 3 male 35.0 0 0 8.0500 S Third \\n\",\n",
432
+ " \"5 0 3 male NaN 0 0 8.4583 Q Third \\n\",\n",
433
+ " \"6 0 1 male 54.0 0 0 51.8625 S First \\n\",\n",
434
+ " \"7 0 3 male 2.0 3 1 21.0750 S Third \\n\",\n",
435
+ " \"8 1 3 female 27.0 0 2 11.1333 S Third \\n\",\n",
436
+ " \"9 1 2 female 14.0 1 0 30.0708 C Second \\n\",\n",
437
+ " \"\\n\",\n",
438
+ " \" who adult_male deck embark_town alive alone \\n\",\n",
439
+ " \"0 man True NaN Southampton no False \\n\",\n",
440
+ " \"1 woman False C Cherbourg yes False \\n\",\n",
441
+ " \"2 woman False NaN Southampton yes True \\n\",\n",
442
+ " \"3 woman False C Southampton yes False \\n\",\n",
443
+ " \"4 man True NaN Southampton no True \\n\",\n",
444
+ " \"5 man True NaN Queenstown no True \\n\",\n",
445
+ " \"6 man True E Southampton no True \\n\",\n",
446
+ " \"7 child False NaN Southampton no False \\n\",\n",
447
+ " \"8 woman False NaN Southampton yes False \\n\",\n",
448
+ " \"9 child False NaN Cherbourg yes False \"\n",
449
+ " ]\n",
450
+ " },\n",
451
+ " \"execution_count\": 4,\n",
452
+ " \"metadata\": {},\n",
453
+ " \"output_type\": \"execute_result\"\n",
454
+ " }\n",
455
+ " ],\n",
456
+ " \"source\": [\n",
457
+ " \"import seaborn as sns\\n\",\n",
458
+ " \"titanic = sns.load_dataset('titanic')\\n\",\n",
459
+ " \"titanic.head(10)\"\n",
460
+ " ]\n",
461
+ " },\n",
462
+ " {\n",
463
+ " \"cell_type\": \"code\",\n",
464
+ " \"execution_count\": 5,\n",
465
+ " \"metadata\": {},\n",
466
+ " \"outputs\": [],\n",
467
+ " \"source\": [\n",
468
+ " \"X = titanic.drop('survived',axis = 1)\\n\",\n",
469
+ " \"Y = titanic['survived']\"\n",
470
+ " ]\n",
471
+ " },\n",
472
+ " {\n",
473
+ " \"cell_type\": \"code\",\n",
474
+ " \"execution_count\": 6,\n",
475
+ " \"metadata\": {},\n",
476
+ " \"outputs\": [\n",
477
+ " {\n",
478
+ " \"data\": {\n",
479
+ " \"text/plain\": [\n",
480
+ " \"(891, 14)\"\n",
481
+ " ]\n",
482
+ " },\n",
483
+ " \"execution_count\": 6,\n",
484
+ " \"metadata\": {},\n",
485
+ " \"output_type\": \"execute_result\"\n",
486
+ " }\n",
487
+ " ],\n",
488
+ " \"source\": [\n",
489
+ " \"X.shape\"\n",
490
+ " ]\n",
491
+ " },\n",
492
+ " {\n",
493
+ " \"cell_type\": \"code\",\n",
494
+ " \"execution_count\": 7,\n",
495
+ " \"metadata\": {},\n",
496
+ " \"outputs\": [\n",
497
+ " {\n",
498
+ " \"data\": {\n",
499
+ " \"text/plain\": [\n",
500
+ " \"(891,)\"\n",
501
+ " ]\n",
502
+ " },\n",
503
+ " \"execution_count\": 7,\n",
504
+ " \"metadata\": {},\n",
505
+ " \"output_type\": \"execute_result\"\n",
506
+ " }\n",
507
+ " ],\n",
508
+ " \"source\": [\n",
509
+ " \"Y.shape\"\n",
510
+ " ]\n",
511
+ " },\n",
512
+ " {\n",
513
+ " \"cell_type\": \"code\",\n",
514
+ " \"execution_count\": null,\n",
515
+ " \"metadata\": {},\n",
516
+ " \"outputs\": [],\n",
517
+ " \"source\": []\n",
518
+ " }\n",
519
+ " ],\n",
520
+ " \"metadata\": {\n",
521
+ " \"kernelspec\": {\n",
522
+ " \"display_name\": \"Python 3\",\n",
523
+ " \"language\": \"python\",\n",
524
+ " \"name\": \"python3\"\n",
525
+ " },\n",
526
+ " \"language_info\": {\n",
527
+ " \"codemirror_mode\": {\n",
528
+ " \"name\": \"ipython\",\n",
529
+ " \"version\": 3\n",
530
+ " },\n",
531
+ " \"file_extension\": \".py\",\n",
532
+ " \"mimetype\": \"text/x-python\",\n",
533
+ " \"name\": \"python\",\n",
534
+ " \"nbconvert_exporter\": \"python\",\n",
535
+ " \"pygments_lexer\": \"ipython3\",\n",
536
+ " \"version\": \"3.6.7\"\n",
537
+ " }\n",
538
+ " },\n",
539
+ " \"nbformat\": 4,\n",
540
+ " \"nbformat_minor\": 2\n",
541
+ "}\n"
542
+ ]
543
+ }
544
+ ]
545
+ },
546
+ {
547
+ "cell_type": "code",
548
+ "metadata": {
549
+ "colab": {
550
+ "base_uri": "https://localhost:8080/",
551
+ "height": 383
552
+ },
553
+ "id": "1b2938e2",
554
+ "outputId": "50844bb9-e0d9-48bf-a6ae-79e9aa0a0c8c"
555
+ },
556
+ "source": [
557
+ "import seaborn as sns\n",
558
+ "titanic = sns.load_dataset('titanic')\n",
559
+ "titanic.head(10)"
560
+ ],
561
+ "execution_count": 9,
562
+ "outputs": [
563
+ {
564
+ "output_type": "execute_result",
565
+ "data": {
566
+ "text/plain": [
567
+ " survived pclass sex age sibsp parch fare embarked class \\\n",
568
+ "0 0 3 male 22.0 1 0 7.2500 S Third \n",
569
+ "1 1 1 female 38.0 1 0 71.2833 C First \n",
570
+ "2 1 3 female 26.0 0 0 7.9250 S Third \n",
571
+ "3 1 1 female 35.0 1 0 53.1000 S First \n",
572
+ "4 0 3 male 35.0 0 0 8.0500 S Third \n",
573
+ "5 0 3 male NaN 0 0 8.4583 Q Third \n",
574
+ "6 0 1 male 54.0 0 0 51.8625 S First \n",
575
+ "7 0 3 male 2.0 3 1 21.0750 S Third \n",
576
+ "8 1 3 female 27.0 0 2 11.1333 S Third \n",
577
+ "9 1 2 female 14.0 1 0 30.0708 C Second \n",
578
+ "\n",
579
+ " who adult_male deck embark_town alive alone \n",
580
+ "0 man True NaN Southampton no False \n",
581
+ "1 woman False C Cherbourg yes False \n",
582
+ "2 woman False NaN Southampton yes True \n",
583
+ "3 woman False C Southampton yes False \n",
584
+ "4 man True NaN Southampton no True \n",
585
+ "5 man True NaN Queenstown no True \n",
586
+ "6 man True E Southampton no True \n",
587
+ "7 child False NaN Southampton no False \n",
588
+ "8 woman False NaN Southampton yes False \n",
589
+ "9 child False NaN Cherbourg yes False "
590
+ ],
591
+ "text/html": [
592
+ "\n",
593
+ " <div id=\"df-624c1dc8-4758-4bc3-9fe9-1528c5e244ca\" class=\"colab-df-container\">\n",
594
+ " <div>\n",
595
+ "<style scoped>\n",
596
+ " .dataframe tbody tr th:only-of-type {\n",
597
+ " vertical-align: middle;\n",
598
+ " }\n",
599
+ "\n",
600
+ " .dataframe tbody tr th {\n",
601
+ " vertical-align: top;\n",
602
+ " }\n",
603
+ "\n",
604
+ " .dataframe thead th {\n",
605
+ " text-align: right;\n",
606
+ " }\n",
607
+ "</style>\n",
608
+ "<table border=\"1\" class=\"dataframe\">\n",
609
+ " <thead>\n",
610
+ " <tr style=\"text-align: right;\">\n",
611
+ " <th></th>\n",
612
+ " <th>survived</th>\n",
613
+ " <th>pclass</th>\n",
614
+ " <th>sex</th>\n",
615
+ " <th>age</th>\n",
616
+ " <th>sibsp</th>\n",
617
+ " <th>parch</th>\n",
618
+ " <th>fare</th>\n",
619
+ " <th>embarked</th>\n",
620
+ " <th>class</th>\n",
621
+ " <th>who</th>\n",
622
+ " <th>adult_male</th>\n",
623
+ " <th>deck</th>\n",
624
+ " <th>embark_town</th>\n",
625
+ " <th>alive</th>\n",
626
+ " <th>alone</th>\n",
627
+ " </tr>\n",
628
+ " </thead>\n",
629
+ " <tbody>\n",
630
+ " <tr>\n",
631
+ " <th>0</th>\n",
632
+ " <td>0</td>\n",
633
+ " <td>3</td>\n",
634
+ " <td>male</td>\n",
635
+ " <td>22.0</td>\n",
636
+ " <td>1</td>\n",
637
+ " <td>0</td>\n",
638
+ " <td>7.2500</td>\n",
639
+ " <td>S</td>\n",
640
+ " <td>Third</td>\n",
641
+ " <td>man</td>\n",
642
+ " <td>True</td>\n",
643
+ " <td>NaN</td>\n",
644
+ " <td>Southampton</td>\n",
645
+ " <td>no</td>\n",
646
+ " <td>False</td>\n",
647
+ " </tr>\n",
648
+ " <tr>\n",
649
+ " <th>1</th>\n",
650
+ " <td>1</td>\n",
651
+ " <td>1</td>\n",
652
+ " <td>female</td>\n",
653
+ " <td>38.0</td>\n",
654
+ " <td>1</td>\n",
655
+ " <td>0</td>\n",
656
+ " <td>71.2833</td>\n",
657
+ " <td>C</td>\n",
658
+ " <td>First</td>\n",
659
+ " <td>woman</td>\n",
660
+ " <td>False</td>\n",
661
+ " <td>C</td>\n",
662
+ " <td>Cherbourg</td>\n",
663
+ " <td>yes</td>\n",
664
+ " <td>False</td>\n",
665
+ " </tr>\n",
666
+ " <tr>\n",
667
+ " <th>2</th>\n",
668
+ " <td>1</td>\n",
669
+ " <td>3</td>\n",
670
+ " <td>female</td>\n",
671
+ " <td>26.0</td>\n",
672
+ " <td>0</td>\n",
673
+ " <td>0</td>\n",
674
+ " <td>7.9250</td>\n",
675
+ " <td>S</td>\n",
676
+ " <td>Third</td>\n",
677
+ " <td>woman</td>\n",
678
+ " <td>False</td>\n",
679
+ " <td>NaN</td>\n",
680
+ " <td>Southampton</td>\n",
681
+ " <td>yes</td>\n",
682
+ " <td>True</td>\n",
683
+ " </tr>\n",
684
+ " <tr>\n",
685
+ " <th>3</th>\n",
686
+ " <td>1</td>\n",
687
+ " <td>1</td>\n",
688
+ " <td>female</td>\n",
689
+ " <td>35.0</td>\n",
690
+ " <td>1</td>\n",
691
+ " <td>0</td>\n",
692
+ " <td>53.1000</td>\n",
693
+ " <td>S</td>\n",
694
+ " <td>First</td>\n",
695
+ " <td>woman</td>\n",
696
+ " <td>False</td>\n",
697
+ " <td>C</td>\n",
698
+ " <td>Southampton</td>\n",
699
+ " <td>yes</td>\n",
700
+ " <td>False</td>\n",
701
+ " </tr>\n",
702
+ " <tr>\n",
703
+ " <th>4</th>\n",
704
+ " <td>0</td>\n",
705
+ " <td>3</td>\n",
706
+ " <td>male</td>\n",
707
+ " <td>35.0</td>\n",
708
+ " <td>0</td>\n",
709
+ " <td>0</td>\n",
710
+ " <td>8.0500</td>\n",
711
+ " <td>S</td>\n",
712
+ " <td>Third</td>\n",
713
+ " <td>man</td>\n",
714
+ " <td>True</td>\n",
715
+ " <td>NaN</td>\n",
716
+ " <td>Southampton</td>\n",
717
+ " <td>no</td>\n",
718
+ " <td>True</td>\n",
719
+ " </tr>\n",
720
+ " <tr>\n",
721
+ " <th>5</th>\n",
722
+ " <td>0</td>\n",
723
+ " <td>3</td>\n",
724
+ " <td>male</td>\n",
725
+ " <td>NaN</td>\n",
726
+ " <td>0</td>\n",
727
+ " <td>0</td>\n",
728
+ " <td>8.4583</td>\n",
729
+ " <td>Q</td>\n",
730
+ " <td>Third</td>\n",
731
+ " <td>man</td>\n",
732
+ " <td>True</td>\n",
733
+ " <td>NaN</td>\n",
734
+ " <td>Queenstown</td>\n",
735
+ " <td>no</td>\n",
736
+ " <td>True</td>\n",
737
+ " </tr>\n",
738
+ " <tr>\n",
739
+ " <th>6</th>\n",
740
+ " <td>0</td>\n",
741
+ " <td>1</td>\n",
742
+ " <td>male</td>\n",
743
+ " <td>54.0</td>\n",
744
+ " <td>0</td>\n",
745
+ " <td>0</td>\n",
746
+ " <td>51.8625</td>\n",
747
+ " <td>S</td>\n",
748
+ " <td>First</td>\n",
749
+ " <td>man</td>\n",
750
+ " <td>True</td>\n",
751
+ " <td>E</td>\n",
752
+ " <td>Southampton</td>\n",
753
+ " <td>no</td>\n",
754
+ " <td>True</td>\n",
755
+ " </tr>\n",
756
+ " <tr>\n",
757
+ " <th>7</th>\n",
758
+ " <td>0</td>\n",
759
+ " <td>3</td>\n",
760
+ " <td>male</td>\n",
761
+ " <td>2.0</td>\n",
762
+ " <td>3</td>\n",
763
+ " <td>1</td>\n",
764
+ " <td>21.0750</td>\n",
765
+ " <td>S</td>\n",
766
+ " <td>Third</td>\n",
767
+ " <td>child</td>\n",
768
+ " <td>False</td>\n",
769
+ " <td>NaN</td>\n",
770
+ " <td>Southampton</td>\n",
771
+ " <td>no</td>\n",
772
+ " <td>False</td>\n",
773
+ " </tr>\n",
774
+ " <tr>\n",
775
+ " <th>8</th>\n",
776
+ " <td>1</td>\n",
777
+ " <td>3</td>\n",
778
+ " <td>female</td>\n",
779
+ " <td>27.0</td>\n",
780
+ " <td>0</td>\n",
781
+ " <td>2</td>\n",
782
+ " <td>11.1333</td>\n",
783
+ " <td>S</td>\n",
784
+ " <td>Third</td>\n",
785
+ " <td>woman</td>\n",
786
+ " <td>False</td>\n",
787
+ " <td>NaN</td>\n",
788
+ " <td>Southampton</td>\n",
789
+ " <td>yes</td>\n",
790
+ " <td>False</td>\n",
791
+ " </tr>\n",
792
+ " <tr>\n",
793
+ " <th>9</th>\n",
794
+ " <td>1</td>\n",
795
+ " <td>2</td>\n",
796
+ " <td>female</td>\n",
797
+ " <td>14.0</td>\n",
798
+ " <td>1</td>\n",
799
+ " <td>0</td>\n",
800
+ " <td>30.0708</td>\n",
801
+ " <td>C</td>\n",
802
+ " <td>Second</td>\n",
803
+ " <td>child</td>\n",
804
+ " <td>False</td>\n",
805
+ " <td>NaN</td>\n",
806
+ " <td>Cherbourg</td>\n",
807
+ " <td>yes</td>\n",
808
+ " <td>False</td>\n",
809
+ " </tr>\n",
810
+ " </tbody>\n",
811
+ "</table>\n",
812
+ "</div>\n",
813
+ " <div class=\"colab-df-buttons\">\n",
814
+ "\n",
815
+ " <div class=\"colab-df-container\">\n",
816
+ " <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-624c1dc8-4758-4bc3-9fe9-1528c5e244ca')\"\n",
817
+ " title=\"Convert this dataframe to an interactive table.\"\n",
818
+ " style=\"display:none;\">\n",
819
+ "\n",
820
+ " <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
821
+ " <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
822
+ " </svg>\n",
823
+ " </button>\n",
824
+ "\n",
825
+ " <style>\n",
826
+ " .colab-df-container {\n",
827
+ " display:flex;\n",
828
+ " gap: 12px;\n",
829
+ " }\n",
830
+ "\n",
831
+ " .colab-df-convert {\n",
832
+ " background-color: #E8F0FE;\n",
833
+ " border: none;\n",
834
+ " border-radius: 50%;\n",
835
+ " cursor: pointer;\n",
836
+ " display: none;\n",
837
+ " fill: #1967D2;\n",
838
+ " height: 32px;\n",
839
+ " padding: 0 0 0 0;\n",
840
+ " width: 32px;\n",
841
+ " }\n",
842
+ "\n",
843
+ " .colab-df-convert:hover {\n",
844
+ " background-color: #E2EBFA;\n",
845
+ " box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
846
+ " fill: #174EA6;\n",
847
+ " }\n",
848
+ "\n",
849
+ " .colab-df-buttons div {\n",
850
+ " margin-bottom: 4px;\n",
851
+ " }\n",
852
+ "\n",
853
+ " [theme=dark] .colab-df-convert {\n",
854
+ " background-color: #3B4455;\n",
855
+ " fill: #D2E3FC;\n",
856
+ " }\n",
857
+ "\n",
858
+ " [theme=dark] .colab-df-convert:hover {\n",
859
+ " background-color: #434B5C;\n",
860
+ " box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
861
+ " filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
862
+ " fill: #FFFFFF;\n",
863
+ " }\n",
864
+ " </style>\n",
865
+ "\n",
866
+ " <script>\n",
867
+ " const buttonEl =\n",
868
+ " document.querySelector('#df-624c1dc8-4758-4bc3-9fe9-1528c5e244ca button.colab-df-convert');\n",
869
+ " buttonEl.style.display =\n",
870
+ " google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
871
+ "\n",
872
+ " async function convertToInteractive(key) {\n",
873
+ " const element = document.querySelector('#df-624c1dc8-4758-4bc3-9fe9-1528c5e244ca');\n",
874
+ " const dataTable =\n",
875
+ " await google.colab.kernel.invokeFunction('convertToInteractive',\n",
876
+ " [key], {});\n",
877
+ " if (!dataTable) return;\n",
878
+ "\n",
879
+ " const docLinkHtml = 'Like what you see? Visit the ' +\n",
880
+ " '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
881
+ " + ' to learn more about interactive tables.';\n",
882
+ " element.innerHTML = '';\n",
883
+ " dataTable['output_type'] = 'display_data';\n",
884
+ " await google.colab.output.renderOutput(dataTable, element);\n",
885
+ " const docLink = document.createElement('div');\n",
886
+ " docLink.innerHTML = docLinkHtml;\n",
887
+ " element.appendChild(docLink);\n",
888
+ " }\n",
889
+ " </script>\n",
890
+ " </div>\n",
891
+ "\n",
892
+ "\n",
893
+ " </div>\n",
894
+ " </div>\n"
895
+ ],
896
+ "application/vnd.google.colaboratory.intrinsic+json": {
897
+ "type": "dataframe",
898
+ "variable_name": "titanic",
899
+ "summary": "{\n \"name\": \"titanic\",\n \"rows\": 891,\n \"fields\": [\n {\n \"column\": \"survived\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0,\n \"min\": 0,\n \"max\": 1,\n \"num_unique_values\": 2,\n \"samples\": [\n 1,\n 0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"pclass\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0,\n \"min\": 1,\n \"max\": 3,\n \"num_unique_values\": 3,\n \"samples\": [\n 3,\n 1\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"sex\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 2,\n \"samples\": [\n \"female\",\n \"male\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"age\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 14.526497332334044,\n \"min\": 0.42,\n \"max\": 80.0,\n \"num_unique_values\": 88,\n \"samples\": [\n 0.75,\n 22.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"sibsp\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1,\n \"min\": 0,\n \"max\": 8,\n \"num_unique_values\": 7,\n \"samples\": [\n 1,\n 0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"parch\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0,\n \"min\": 0,\n \"max\": 6,\n \"num_unique_values\": 7,\n \"samples\": [\n 0,\n 1\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"fare\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 49.693428597180905,\n \"min\": 0.0,\n \"max\": 512.3292,\n \"num_unique_values\": 248,\n \"samples\": [\n 11.2417,\n 51.8625\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"embarked\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"S\",\n \"C\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"class\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"Third\",\n \"First\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"who\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"man\",\n \"woman\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"adult_male\",\n \"properties\": {\n \"dtype\": \"boolean\",\n \"num_unique_values\": 2,\n \"samples\": [\n false,\n true\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"deck\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 7,\n \"samples\": [\n \"C\",\n \"E\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"embark_town\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"Southampton\",\n \"Cherbourg\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"alive\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 2,\n \"samples\": [\n \"yes\",\n \"no\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"alone\",\n \"properties\": {\n \"dtype\": \"boolean\",\n \"num_unique_values\": 2,\n \"samples\": [\n true,\n false\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}"
900
+ }
901
+ },
902
+ "metadata": {},
903
+ "execution_count": 9
904
+ }
905
+ ]
906
+ },
907
+ {
908
+ "cell_type": "code",
909
+ "metadata": {
910
+ "id": "f5507dec"
911
+ },
912
+ "source": [
913
+ "X = titanic.drop('survived',axis = 1)\n",
914
+ "Y = titanic['survived']"
915
+ ],
916
+ "execution_count": 10,
917
+ "outputs": []
918
+ },
919
+ {
920
+ "cell_type": "code",
921
+ "metadata": {
922
+ "colab": {
923
+ "base_uri": "https://localhost:8080/"
924
+ },
925
+ "id": "15cb730c",
926
+ "outputId": "013935cc-3485-4464-92f7-a1d35610398e"
927
+ },
928
+ "source": [
929
+ "X.shape"
930
+ ],
931
+ "execution_count": 11,
932
+ "outputs": [
933
+ {
934
+ "output_type": "execute_result",
935
+ "data": {
936
+ "text/plain": [
937
+ "(891, 14)"
938
+ ]
939
+ },
940
+ "metadata": {},
941
+ "execution_count": 11
942
+ }
943
+ ]
944
+ },
945
+ {
946
+ "cell_type": "code",
947
+ "metadata": {
948
+ "colab": {
949
+ "base_uri": "https://localhost:8080/"
950
+ },
951
+ "id": "42d82e7e",
952
+ "outputId": "569c12a3-aa63-412e-dbda-9e218ac0fcb2"
953
+ },
954
+ "source": [
955
+ "Y.shape"
956
+ ],
957
+ "execution_count": 12,
958
+ "outputs": [
959
+ {
960
+ "output_type": "execute_result",
961
+ "data": {
962
+ "text/plain": [
963
+ "(891,)"
964
+ ]
965
+ },
966
+ "metadata": {},
967
+ "execution_count": 12
968
+ }
969
+ ]
970
+ },
971
+ {
972
+ "cell_type": "markdown",
973
+ "source": [
974
+ "Dealing with messy data"
975
+ ],
976
+ "metadata": {
977
+ "id": "BN_Y-5xcReHs"
978
+ }
979
+ },
980
+ {
981
+ "cell_type": "code",
982
+ "source": [
983
+ "import seaborn as sns\n",
984
+ "import numpy as np\n",
985
+ "import matplotlib.pyplot as plt\n",
986
+ "tips = sns.load_dataset('tips')"
987
+ ],
988
+ "metadata": {
989
+ "id": "6V7NzckGO9cR"
990
+ },
991
+ "execution_count": 13,
992
+ "outputs": []
993
+ },
994
+ {
995
+ "cell_type": "code",
996
+ "source": [
997
+ "size = tips[\"size\"]\n",
998
+ "size.loc[:15] = np.nan\n",
999
+ "size.head(20)"
1000
+ ],
1001
+ "metadata": {
1002
+ "colab": {
1003
+ "base_uri": "https://localhost:8080/",
1004
+ "height": 818
1005
+ },
1006
+ "id": "P_r3-rSpPMoe",
1007
+ "outputId": "31862675-e3c0-4921-e31d-a1db2a8ff466"
1008
+ },
1009
+ "execution_count": 14,
1010
+ "outputs": [
1011
+ {
1012
+ "output_type": "stream",
1013
+ "name": "stderr",
1014
+ "text": [
1015
+ "/tmp/ipykernel_250/2240814414.py:2: SettingWithCopyWarning: \n",
1016
+ "A value is trying to be set on a copy of a slice from a DataFrame\n",
1017
+ "\n",
1018
+ "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
1019
+ " size.loc[:15] = np.nan\n"
1020
+ ]
1021
+ },
1022
+ {
1023
+ "output_type": "execute_result",
1024
+ "data": {
1025
+ "text/plain": [
1026
+ "0 NaN\n",
1027
+ "1 NaN\n",
1028
+ "2 NaN\n",
1029
+ "3 NaN\n",
1030
+ "4 NaN\n",
1031
+ "5 NaN\n",
1032
+ "6 NaN\n",
1033
+ "7 NaN\n",
1034
+ "8 NaN\n",
1035
+ "9 NaN\n",
1036
+ "10 NaN\n",
1037
+ "11 NaN\n",
1038
+ "12 NaN\n",
1039
+ "13 NaN\n",
1040
+ "14 NaN\n",
1041
+ "15 NaN\n",
1042
+ "16 3.0\n",
1043
+ "17 3.0\n",
1044
+ "18 3.0\n",
1045
+ "19 3.0\n",
1046
+ "Name: size, dtype: float64"
1047
+ ],
1048
+ "text/html": [
1049
+ "<div>\n",
1050
+ "<style scoped>\n",
1051
+ " .dataframe tbody tr th:only-of-type {\n",
1052
+ " vertical-align: middle;\n",
1053
+ " }\n",
1054
+ "\n",
1055
+ " .dataframe tbody tr th {\n",
1056
+ " vertical-align: top;\n",
1057
+ " }\n",
1058
+ "\n",
1059
+ " .dataframe thead th {\n",
1060
+ " text-align: right;\n",
1061
+ " }\n",
1062
+ "</style>\n",
1063
+ "<table border=\"1\" class=\"dataframe\">\n",
1064
+ " <thead>\n",
1065
+ " <tr style=\"text-align: right;\">\n",
1066
+ " <th></th>\n",
1067
+ " <th>size</th>\n",
1068
+ " </tr>\n",
1069
+ " </thead>\n",
1070
+ " <tbody>\n",
1071
+ " <tr>\n",
1072
+ " <th>0</th>\n",
1073
+ " <td>NaN</td>\n",
1074
+ " </tr>\n",
1075
+ " <tr>\n",
1076
+ " <th>1</th>\n",
1077
+ " <td>NaN</td>\n",
1078
+ " </tr>\n",
1079
+ " <tr>\n",
1080
+ " <th>2</th>\n",
1081
+ " <td>NaN</td>\n",
1082
+ " </tr>\n",
1083
+ " <tr>\n",
1084
+ " <th>3</th>\n",
1085
+ " <td>NaN</td>\n",
1086
+ " </tr>\n",
1087
+ " <tr>\n",
1088
+ " <th>4</th>\n",
1089
+ " <td>NaN</td>\n",
1090
+ " </tr>\n",
1091
+ " <tr>\n",
1092
+ " <th>5</th>\n",
1093
+ " <td>NaN</td>\n",
1094
+ " </tr>\n",
1095
+ " <tr>\n",
1096
+ " <th>6</th>\n",
1097
+ " <td>NaN</td>\n",
1098
+ " </tr>\n",
1099
+ " <tr>\n",
1100
+ " <th>7</th>\n",
1101
+ " <td>NaN</td>\n",
1102
+ " </tr>\n",
1103
+ " <tr>\n",
1104
+ " <th>8</th>\n",
1105
+ " <td>NaN</td>\n",
1106
+ " </tr>\n",
1107
+ " <tr>\n",
1108
+ " <th>9</th>\n",
1109
+ " <td>NaN</td>\n",
1110
+ " </tr>\n",
1111
+ " <tr>\n",
1112
+ " <th>10</th>\n",
1113
+ " <td>NaN</td>\n",
1114
+ " </tr>\n",
1115
+ " <tr>\n",
1116
+ " <th>11</th>\n",
1117
+ " <td>NaN</td>\n",
1118
+ " </tr>\n",
1119
+ " <tr>\n",
1120
+ " <th>12</th>\n",
1121
+ " <td>NaN</td>\n",
1122
+ " </tr>\n",
1123
+ " <tr>\n",
1124
+ " <th>13</th>\n",
1125
+ " <td>NaN</td>\n",
1126
+ " </tr>\n",
1127
+ " <tr>\n",
1128
+ " <th>14</th>\n",
1129
+ " <td>NaN</td>\n",
1130
+ " </tr>\n",
1131
+ " <tr>\n",
1132
+ " <th>15</th>\n",
1133
+ " <td>NaN</td>\n",
1134
+ " </tr>\n",
1135
+ " <tr>\n",
1136
+ " <th>16</th>\n",
1137
+ " <td>3.0</td>\n",
1138
+ " </tr>\n",
1139
+ " <tr>\n",
1140
+ " <th>17</th>\n",
1141
+ " <td>3.0</td>\n",
1142
+ " </tr>\n",
1143
+ " <tr>\n",
1144
+ " <th>18</th>\n",
1145
+ " <td>3.0</td>\n",
1146
+ " </tr>\n",
1147
+ " <tr>\n",
1148
+ " <th>19</th>\n",
1149
+ " <td>3.0</td>\n",
1150
+ " </tr>\n",
1151
+ " </tbody>\n",
1152
+ "</table>\n",
1153
+ "</div><br><label><b>dtype:</b> float64</label>"
1154
+ ]
1155
+ },
1156
+ "metadata": {},
1157
+ "execution_count": 14
1158
+ }
1159
+ ]
1160
+ },
1161
+ {
1162
+ "cell_type": "code",
1163
+ "source": [
1164
+ "size.shape"
1165
+ ],
1166
+ "metadata": {
1167
+ "colab": {
1168
+ "base_uri": "https://localhost:8080/"
1169
+ },
1170
+ "id": "rnPfIPArQOFB",
1171
+ "outputId": "354e9712-9be9-4027-9f1f-5f1a10c0af5c"
1172
+ },
1173
+ "execution_count": 15,
1174
+ "outputs": [
1175
+ {
1176
+ "output_type": "execute_result",
1177
+ "data": {
1178
+ "text/plain": [
1179
+ "(244,)"
1180
+ ]
1181
+ },
1182
+ "metadata": {},
1183
+ "execution_count": 15
1184
+ }
1185
+ ]
1186
+ },
1187
+ {
1188
+ "cell_type": "code",
1189
+ "source": [
1190
+ "size.isnull().sum()"
1191
+ ],
1192
+ "metadata": {
1193
+ "colab": {
1194
+ "base_uri": "https://localhost:8080/"
1195
+ },
1196
+ "id": "iqtgBQ89QU81",
1197
+ "outputId": "7f2d365d-32c8-4a27-c954-53974aef2182"
1198
+ },
1199
+ "execution_count": 17,
1200
+ "outputs": [
1201
+ {
1202
+ "output_type": "execute_result",
1203
+ "data": {
1204
+ "text/plain": [
1205
+ "np.int64(16)"
1206
+ ]
1207
+ },
1208
+ "metadata": {},
1209
+ "execution_count": 17
1210
+ }
1211
+ ]
1212
+ },
1213
+ {
1214
+ "cell_type": "code",
1215
+ "source": [
1216
+ "mean = size.mean()\n",
1217
+ "mean = round(mean)\n",
1218
+ "print(mean)"
1219
+ ],
1220
+ "metadata": {
1221
+ "colab": {
1222
+ "base_uri": "https://localhost:8080/"
1223
+ },
1224
+ "id": "9LL1usX3QfWL",
1225
+ "outputId": "bb5afd03-3ca1-4153-cbd8-c5cbd21834f3"
1226
+ },
1227
+ "execution_count": 18,
1228
+ "outputs": [
1229
+ {
1230
+ "output_type": "stream",
1231
+ "name": "stdout",
1232
+ "text": [
1233
+ "3\n"
1234
+ ]
1235
+ }
1236
+ ]
1237
+ },
1238
+ {
1239
+ "cell_type": "code",
1240
+ "source": [
1241
+ "size.fillna(mean, inplace=True)\n",
1242
+ "size.head(20)"
1243
+ ],
1244
+ "metadata": {
1245
+ "colab": {
1246
+ "base_uri": "https://localhost:8080/",
1247
+ "height": 711
1248
+ },
1249
+ "id": "ghShyvScQigg",
1250
+ "outputId": "35e4f709-e614-40b9-ba4a-e092d874cdce"
1251
+ },
1252
+ "execution_count": 19,
1253
+ "outputs": [
1254
+ {
1255
+ "output_type": "execute_result",
1256
+ "data": {
1257
+ "text/plain": [
1258
+ "0 3.0\n",
1259
+ "1 3.0\n",
1260
+ "2 3.0\n",
1261
+ "3 3.0\n",
1262
+ "4 3.0\n",
1263
+ "5 3.0\n",
1264
+ "6 3.0\n",
1265
+ "7 3.0\n",
1266
+ "8 3.0\n",
1267
+ "9 3.0\n",
1268
+ "10 3.0\n",
1269
+ "11 3.0\n",
1270
+ "12 3.0\n",
1271
+ "13 3.0\n",
1272
+ "14 3.0\n",
1273
+ "15 3.0\n",
1274
+ "16 3.0\n",
1275
+ "17 3.0\n",
1276
+ "18 3.0\n",
1277
+ "19 3.0\n",
1278
+ "Name: size, dtype: float64"
1279
+ ],
1280
+ "text/html": [
1281
+ "<div>\n",
1282
+ "<style scoped>\n",
1283
+ " .dataframe tbody tr th:only-of-type {\n",
1284
+ " vertical-align: middle;\n",
1285
+ " }\n",
1286
+ "\n",
1287
+ " .dataframe tbody tr th {\n",
1288
+ " vertical-align: top;\n",
1289
+ " }\n",
1290
+ "\n",
1291
+ " .dataframe thead th {\n",
1292
+ " text-align: right;\n",
1293
+ " }\n",
1294
+ "</style>\n",
1295
+ "<table border=\"1\" class=\"dataframe\">\n",
1296
+ " <thead>\n",
1297
+ " <tr style=\"text-align: right;\">\n",
1298
+ " <th></th>\n",
1299
+ " <th>size</th>\n",
1300
+ " </tr>\n",
1301
+ " </thead>\n",
1302
+ " <tbody>\n",
1303
+ " <tr>\n",
1304
+ " <th>0</th>\n",
1305
+ " <td>3.0</td>\n",
1306
+ " </tr>\n",
1307
+ " <tr>\n",
1308
+ " <th>1</th>\n",
1309
+ " <td>3.0</td>\n",
1310
+ " </tr>\n",
1311
+ " <tr>\n",
1312
+ " <th>2</th>\n",
1313
+ " <td>3.0</td>\n",
1314
+ " </tr>\n",
1315
+ " <tr>\n",
1316
+ " <th>3</th>\n",
1317
+ " <td>3.0</td>\n",
1318
+ " </tr>\n",
1319
+ " <tr>\n",
1320
+ " <th>4</th>\n",
1321
+ " <td>3.0</td>\n",
1322
+ " </tr>\n",
1323
+ " <tr>\n",
1324
+ " <th>5</th>\n",
1325
+ " <td>3.0</td>\n",
1326
+ " </tr>\n",
1327
+ " <tr>\n",
1328
+ " <th>6</th>\n",
1329
+ " <td>3.0</td>\n",
1330
+ " </tr>\n",
1331
+ " <tr>\n",
1332
+ " <th>7</th>\n",
1333
+ " <td>3.0</td>\n",
1334
+ " </tr>\n",
1335
+ " <tr>\n",
1336
+ " <th>8</th>\n",
1337
+ " <td>3.0</td>\n",
1338
+ " </tr>\n",
1339
+ " <tr>\n",
1340
+ " <th>9</th>\n",
1341
+ " <td>3.0</td>\n",
1342
+ " </tr>\n",
1343
+ " <tr>\n",
1344
+ " <th>10</th>\n",
1345
+ " <td>3.0</td>\n",
1346
+ " </tr>\n",
1347
+ " <tr>\n",
1348
+ " <th>11</th>\n",
1349
+ " <td>3.0</td>\n",
1350
+ " </tr>\n",
1351
+ " <tr>\n",
1352
+ " <th>12</th>\n",
1353
+ " <td>3.0</td>\n",
1354
+ " </tr>\n",
1355
+ " <tr>\n",
1356
+ " <th>13</th>\n",
1357
+ " <td>3.0</td>\n",
1358
+ " </tr>\n",
1359
+ " <tr>\n",
1360
+ " <th>14</th>\n",
1361
+ " <td>3.0</td>\n",
1362
+ " </tr>\n",
1363
+ " <tr>\n",
1364
+ " <th>15</th>\n",
1365
+ " <td>3.0</td>\n",
1366
+ " </tr>\n",
1367
+ " <tr>\n",
1368
+ " <th>16</th>\n",
1369
+ " <td>3.0</td>\n",
1370
+ " </tr>\n",
1371
+ " <tr>\n",
1372
+ " <th>17</th>\n",
1373
+ " <td>3.0</td>\n",
1374
+ " </tr>\n",
1375
+ " <tr>\n",
1376
+ " <th>18</th>\n",
1377
+ " <td>3.0</td>\n",
1378
+ " </tr>\n",
1379
+ " <tr>\n",
1380
+ " <th>19</th>\n",
1381
+ " <td>3.0</td>\n",
1382
+ " </tr>\n",
1383
+ " </tbody>\n",
1384
+ "</table>\n",
1385
+ "</div><br><label><b>dtype:</b> float64</label>"
1386
+ ]
1387
+ },
1388
+ "metadata": {},
1389
+ "execution_count": 19
1390
+ }
1391
+ ]
1392
+ },
1393
+ {
1394
+ "cell_type": "code",
1395
+ "source": [
1396
+ "size.fillna(mean, inplace=True)\n",
1397
+ "size.head(20)"
1398
+ ],
1399
+ "metadata": {
1400
+ "colab": {
1401
+ "base_uri": "https://localhost:8080/",
1402
+ "height": 711
1403
+ },
1404
+ "id": "_mQUexwyQm1L",
1405
+ "outputId": "cf4b0447-603a-4236-80e6-0579ed7af235"
1406
+ },
1407
+ "execution_count": 20,
1408
+ "outputs": [
1409
+ {
1410
+ "output_type": "execute_result",
1411
+ "data": {
1412
+ "text/plain": [
1413
+ "0 3.0\n",
1414
+ "1 3.0\n",
1415
+ "2 3.0\n",
1416
+ "3 3.0\n",
1417
+ "4 3.0\n",
1418
+ "5 3.0\n",
1419
+ "6 3.0\n",
1420
+ "7 3.0\n",
1421
+ "8 3.0\n",
1422
+ "9 3.0\n",
1423
+ "10 3.0\n",
1424
+ "11 3.0\n",
1425
+ "12 3.0\n",
1426
+ "13 3.0\n",
1427
+ "14 3.0\n",
1428
+ "15 3.0\n",
1429
+ "16 3.0\n",
1430
+ "17 3.0\n",
1431
+ "18 3.0\n",
1432
+ "19 3.0\n",
1433
+ "Name: size, dtype: float64"
1434
+ ],
1435
+ "text/html": [
1436
+ "<div>\n",
1437
+ "<style scoped>\n",
1438
+ " .dataframe tbody tr th:only-of-type {\n",
1439
+ " vertical-align: middle;\n",
1440
+ " }\n",
1441
+ "\n",
1442
+ " .dataframe tbody tr th {\n",
1443
+ " vertical-align: top;\n",
1444
+ " }\n",
1445
+ "\n",
1446
+ " .dataframe thead th {\n",
1447
+ " text-align: right;\n",
1448
+ " }\n",
1449
+ "</style>\n",
1450
+ "<table border=\"1\" class=\"dataframe\">\n",
1451
+ " <thead>\n",
1452
+ " <tr style=\"text-align: right;\">\n",
1453
+ " <th></th>\n",
1454
+ " <th>size</th>\n",
1455
+ " </tr>\n",
1456
+ " </thead>\n",
1457
+ " <tbody>\n",
1458
+ " <tr>\n",
1459
+ " <th>0</th>\n",
1460
+ " <td>3.0</td>\n",
1461
+ " </tr>\n",
1462
+ " <tr>\n",
1463
+ " <th>1</th>\n",
1464
+ " <td>3.0</td>\n",
1465
+ " </tr>\n",
1466
+ " <tr>\n",
1467
+ " <th>2</th>\n",
1468
+ " <td>3.0</td>\n",
1469
+ " </tr>\n",
1470
+ " <tr>\n",
1471
+ " <th>3</th>\n",
1472
+ " <td>3.0</td>\n",
1473
+ " </tr>\n",
1474
+ " <tr>\n",
1475
+ " <th>4</th>\n",
1476
+ " <td>3.0</td>\n",
1477
+ " </tr>\n",
1478
+ " <tr>\n",
1479
+ " <th>5</th>\n",
1480
+ " <td>3.0</td>\n",
1481
+ " </tr>\n",
1482
+ " <tr>\n",
1483
+ " <th>6</th>\n",
1484
+ " <td>3.0</td>\n",
1485
+ " </tr>\n",
1486
+ " <tr>\n",
1487
+ " <th>7</th>\n",
1488
+ " <td>3.0</td>\n",
1489
+ " </tr>\n",
1490
+ " <tr>\n",
1491
+ " <th>8</th>\n",
1492
+ " <td>3.0</td>\n",
1493
+ " </tr>\n",
1494
+ " <tr>\n",
1495
+ " <th>9</th>\n",
1496
+ " <td>3.0</td>\n",
1497
+ " </tr>\n",
1498
+ " <tr>\n",
1499
+ " <th>10</th>\n",
1500
+ " <td>3.0</td>\n",
1501
+ " </tr>\n",
1502
+ " <tr>\n",
1503
+ " <th>11</th>\n",
1504
+ " <td>3.0</td>\n",
1505
+ " </tr>\n",
1506
+ " <tr>\n",
1507
+ " <th>12</th>\n",
1508
+ " <td>3.0</td>\n",
1509
+ " </tr>\n",
1510
+ " <tr>\n",
1511
+ " <th>13</th>\n",
1512
+ " <td>3.0</td>\n",
1513
+ " </tr>\n",
1514
+ " <tr>\n",
1515
+ " <th>14</th>\n",
1516
+ " <td>3.0</td>\n",
1517
+ " </tr>\n",
1518
+ " <tr>\n",
1519
+ " <th>15</th>\n",
1520
+ " <td>3.0</td>\n",
1521
+ " </tr>\n",
1522
+ " <tr>\n",
1523
+ " <th>16</th>\n",
1524
+ " <td>3.0</td>\n",
1525
+ " </tr>\n",
1526
+ " <tr>\n",
1527
+ " <th>17</th>\n",
1528
+ " <td>3.0</td>\n",
1529
+ " </tr>\n",
1530
+ " <tr>\n",
1531
+ " <th>18</th>\n",
1532
+ " <td>3.0</td>\n",
1533
+ " </tr>\n",
1534
+ " <tr>\n",
1535
+ " <th>19</th>\n",
1536
+ " <td>3.0</td>\n",
1537
+ " </tr>\n",
1538
+ " </tbody>\n",
1539
+ "</table>\n",
1540
+ "</div><br><label><b>dtype:</b> float64</label>"
1541
+ ]
1542
+ },
1543
+ "metadata": {},
1544
+ "execution_count": 20
1545
+ }
1546
+ ]
1547
+ },
1548
+ {
1549
+ "cell_type": "code",
1550
+ "source": [
1551
+ "plt.hist(size)\n",
1552
+ "plt.show()"
1553
+ ],
1554
+ "metadata": {
1555
+ "colab": {
1556
+ "base_uri": "https://localhost:8080/",
1557
+ "height": 430
1558
+ },
1559
+ "id": "5-eF8tU2QqML",
1560
+ "outputId": "90cc9e79-d455-4bd3-81dc-df23ae164e78"
1561
+ },
1562
+ "execution_count": 21,
1563
+ "outputs": [
1564
+ {
1565
+ "output_type": "display_data",
1566
+ "data": {
1567
+ "text/plain": [
1568
+ "<Figure size 640x480 with 1 Axes>"
1569
+ ],
1570
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAigAAAGdCAYAAAA44ojeAAAAOnRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjEwLjAsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvlHJYcgAAAAlwSFlzAAAPYQAAD2EBqD+naQAAH+9JREFUeJzt3XtwVPX9//HXhiWXYnZj0iabLQmkLTXcjURjhFqUjBiYFEaq4kSaIgO9JCikVUhHUFokwHhBaEyEsaAzUKqdgopjLA1K6hhCCKUjSBEqQipu0g5ml8QhRnJ+f7Tu77uSqqGbnM+uz8fMmXHPOXvy3jM6eXr2bNZhWZYlAAAAg8TYPQAAAMCnESgAAMA4BAoAAD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q1WrVkmScnJydPjwYdXU1NgSKLzFgwFXVlamXbt26dVXX9XQoUPtHidqxcbG6lvf+pYmTJigyspKjR8/Xo8//rjdY0WV5uZmtbW16aqrrpLT6ZTT6dTevXu1fv16OZ1OXbhwwe4Ro1JSUpK+/e1v68SJE3aPElXS09Mv+h+YkSNH2vZ2GldQMGAsy9LChQu1Y8cOvfbaa7befPVl1NPTo66uLrvHiCpTpkzRm2++GbJu7ty5ys7O1pIlSzRo0CCbJotuHR0d+vvf/645c+bYPUpUmThx4kV/+uHtt9/WsGHDbJmHQPmPjo6OkBo/efKkDh06pOTkZGVmZto4WfQoLS3Vtm3b9PzzzysxMVE+n0+S5Ha7lZCQYPN00aWiokKFhYXKzMzUuXPntG3bNr322mt65ZVX7B4tqiQmJl50D9WQIUOUkpLCvVVh9POf/1xFRUUaNmyYzpw5owceeECDBg3SHXfcYfdoUWXx4sW67rrrtGrVKt12223av3+/Nm7cqI0bN9ozkAXLsizr1VdftSRdtJSUlNg9WtTo7fxKsjZv3mz3aFHnrrvusoYNG2bFxsZaX/va16wpU6ZYf/zjH+0e60vhu9/9rnXPPffYPUZUuf3226309HQrNjbW+vrXv27dfvvt1okTJ+weKyq9+OKL1pgxY6y4uDgrOzvb2rhxo22zOCzLsuxJIwAAgN5xkywAADAOgQIAAIxDoAAAAOMQKAAAwDgECgAAMA6BAgAAjEOgAAAA4xAoAADAOAQKAAAwDoECAACMQ6AAAADjECgAAMA4/w8vLGekpacueAAAAABJRU5ErkJggg==\n"
1571
+ },
1572
+ "metadata": {}
1573
+ }
1574
+ ]
1575
+ },
1576
+ {
1577
+ "cell_type": "code",
1578
+ "source": [
1579
+ "min_val = size.mean() - (3 * size.std())\n",
1580
+ "print(min_val)"
1581
+ ],
1582
+ "metadata": {
1583
+ "colab": {
1584
+ "base_uri": "https://localhost:8080/"
1585
+ },
1586
+ "id": "_U-ot3whQzSA",
1587
+ "outputId": "e43779ed-5fca-4010-d9a0-31a89568add0"
1588
+ },
1589
+ "execution_count": 22,
1590
+ "outputs": [
1591
+ {
1592
+ "output_type": "stream",
1593
+ "name": "stdout",
1594
+ "text": [
1595
+ "-0.1974349065787404\n"
1596
+ ]
1597
+ }
1598
+ ]
1599
+ },
1600
+ {
1601
+ "cell_type": "code",
1602
+ "source": [
1603
+ "max_val = size.mean() + (3 * size.std())\n",
1604
+ "print(max_val)"
1605
+ ],
1606
+ "metadata": {
1607
+ "colab": {
1608
+ "base_uri": "https://localhost:8080/"
1609
+ },
1610
+ "id": "jT4T3Z-eQ28V",
1611
+ "outputId": "4260d170-e038-4610-eb87-0df7e8f21226"
1612
+ },
1613
+ "execution_count": 23,
1614
+ "outputs": [
1615
+ {
1616
+ "output_type": "stream",
1617
+ "name": "stdout",
1618
+ "text": [
1619
+ "5.369566054119724\n"
1620
+ ]
1621
+ }
1622
+ ]
1623
+ },
1624
+ {
1625
+ "cell_type": "code",
1626
+ "source": [
1627
+ "outliers = size[size > max_val]\n",
1628
+ "outliers.count()"
1629
+ ],
1630
+ "metadata": {
1631
+ "colab": {
1632
+ "base_uri": "https://localhost:8080/"
1633
+ },
1634
+ "id": "DE1r88vFQ6ZR",
1635
+ "outputId": "0797c360-89e3-45d9-a951-b64e6f1a1597"
1636
+ },
1637
+ "execution_count": 24,
1638
+ "outputs": [
1639
+ {
1640
+ "output_type": "execute_result",
1641
+ "data": {
1642
+ "text/plain": [
1643
+ "np.int64(4)"
1644
+ ]
1645
+ },
1646
+ "metadata": {},
1647
+ "execution_count": 24
1648
+ }
1649
+ ]
1650
+ },
1651
+ {
1652
+ "cell_type": "code",
1653
+ "source": [
1654
+ "print(outliers)"
1655
+ ],
1656
+ "metadata": {
1657
+ "colab": {
1658
+ "base_uri": "https://localhost:8080/"
1659
+ },
1660
+ "id": "PTWFJ0CaQ93p",
1661
+ "outputId": "15664ebb-ac46-4edb-b311-903ad25739b6"
1662
+ },
1663
+ "execution_count": 25,
1664
+ "outputs": [
1665
+ {
1666
+ "output_type": "stream",
1667
+ "name": "stdout",
1668
+ "text": [
1669
+ "125 6.0\n",
1670
+ "141 6.0\n",
1671
+ "143 6.0\n",
1672
+ "156 6.0\n",
1673
+ "Name: size, dtype: float64\n"
1674
+ ]
1675
+ }
1676
+ ]
1677
+ },
1678
+ {
1679
+ "cell_type": "code",
1680
+ "source": [
1681
+ "age = size[size <= max_val]\n",
1682
+ "age.shape"
1683
+ ],
1684
+ "metadata": {
1685
+ "colab": {
1686
+ "base_uri": "https://localhost:8080/"
1687
+ },
1688
+ "id": "vDZ1IA-3RCHP",
1689
+ "outputId": "9f770a1a-4439-4abf-a5a0-387566ae8d93"
1690
+ },
1691
+ "execution_count": 26,
1692
+ "outputs": [
1693
+ {
1694
+ "output_type": "execute_result",
1695
+ "data": {
1696
+ "text/plain": [
1697
+ "(240,)"
1698
+ ]
1699
+ },
1700
+ "metadata": {},
1701
+ "execution_count": 26
1702
+ }
1703
+ ]
1704
+ }
1705
+ ]
1706
+ }