Skip to content

Commit 58fd466

Browse files
committed
change project 2
1 parent 2284df0 commit 58fd466

1 file changed

Lines changed: 47 additions & 35 deletions

File tree

project 2.ipynb

Lines changed: 47 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
{
2828
"cell_type": "code",
29-
"execution_count": 2,
29+
"execution_count": 1,
3030
"id": "383f4c4e",
3131
"metadata": {},
3232
"outputs": [
@@ -207,12 +207,15 @@
207207
"[478 rows x 6 columns]"
208208
]
209209
},
210-
"execution_count": 2,
210+
"execution_count": 1,
211211
"metadata": {},
212212
"output_type": "execute_result"
213213
}
214214
],
215215
"source": [
216+
"import plotly.io as pio\n",
217+
"pio.renderers.default = \"jupyterlab\"\n",
218+
"\n",
216219
"import pandas as pd\n",
217220
"\n",
218221
"# import first data set.\n",
@@ -222,7 +225,7 @@
222225
},
223226
{
224227
"cell_type": "code",
225-
"execution_count": 3,
228+
"execution_count": 2,
226229
"id": "0b211d5e",
227230
"metadata": {},
228231
"outputs": [
@@ -252,7 +255,7 @@
252255
},
253256
{
254257
"cell_type": "code",
255-
"execution_count": 4,
258+
"execution_count": 3,
256259
"id": "9c6f8357",
257260
"metadata": {},
258261
"outputs": [
@@ -287,7 +290,7 @@
287290
},
288291
{
289292
"cell_type": "code",
290-
"execution_count": 5,
293+
"execution_count": 14,
291294
"id": "ffe0a843",
292295
"metadata": {},
293296
"outputs": [
@@ -318,6 +321,7 @@
318321
" <th>sat_critical_reading_avg_score</th>\n",
319322
" <th>sat_math_avg_score</th>\n",
320323
" <th>sat_writing_avg_score</th>\n",
324+
" <th>total</th>\n",
321325
" <th>sat_total_score</th>\n",
322326
" </tr>\n",
323327
" </thead>\n",
@@ -331,6 +335,7 @@
331335
" <td>404.0</td>\n",
332336
" <td>363.0</td>\n",
333337
" <td>1122.0</td>\n",
338+
" <td>1122.0</td>\n",
334339
" </tr>\n",
335340
" <tr>\n",
336341
" <th>1</th>\n",
@@ -341,6 +346,7 @@
341346
" <td>423.0</td>\n",
342347
" <td>366.0</td>\n",
343348
" <td>1172.0</td>\n",
349+
" <td>1172.0</td>\n",
344350
" </tr>\n",
345351
" <tr>\n",
346352
" <th>2</th>\n",
@@ -351,6 +357,7 @@
351357
" <td>402.0</td>\n",
352358
" <td>370.0</td>\n",
353359
" <td>1149.0</td>\n",
360+
" <td>1149.0</td>\n",
354361
" </tr>\n",
355362
" <tr>\n",
356363
" <th>3</th>\n",
@@ -361,6 +368,7 @@
361368
" <td>401.0</td>\n",
362369
" <td>359.0</td>\n",
363370
" <td>1174.0</td>\n",
371+
" <td>1174.0</td>\n",
364372
" </tr>\n",
365373
" <tr>\n",
366374
" <th>4</th>\n",
@@ -371,6 +379,7 @@
371379
" <td>433.0</td>\n",
372380
" <td>384.0</td>\n",
373381
" <td>1207.0</td>\n",
382+
" <td>1207.0</td>\n",
374383
" </tr>\n",
375384
" <tr>\n",
376385
" <th>...</th>\n",
@@ -381,6 +390,7 @@
381390
" <td>...</td>\n",
382391
" <td>...</td>\n",
383392
" <td>...</td>\n",
393+
" <td>...</td>\n",
384394
" </tr>\n",
385395
" <tr>\n",
386396
" <th>466</th>\n",
@@ -391,6 +401,7 @@
391401
" <td>358.0</td>\n",
392402
" <td>350.0</td>\n",
393403
" <td>1055.0</td>\n",
404+
" <td>1055.0</td>\n",
394405
" </tr>\n",
395406
" <tr>\n",
396407
" <th>467</th>\n",
@@ -401,6 +412,7 @@
401412
" <td>317.0</td>\n",
402413
" <td>358.0</td>\n",
403414
" <td>1034.0</td>\n",
415+
" <td>1034.0</td>\n",
404416
" </tr>\n",
405417
" <tr>\n",
406418
" <th>471</th>\n",
@@ -411,6 +423,7 @@
411423
" <td>444.0</td>\n",
412424
" <td>433.0</td>\n",
413425
" <td>1306.0</td>\n",
426+
" <td>1306.0</td>\n",
414427
" </tr>\n",
415428
" <tr>\n",
416429
" <th>476</th>\n",
@@ -421,6 +434,7 @@
421434
" <td>400.0</td>\n",
422435
" <td>426.0</td>\n",
423436
" <td>1322.0</td>\n",
437+
" <td>1322.0</td>\n",
424438
" </tr>\n",
425439
" <tr>\n",
426440
" <th>477</th>\n",
@@ -431,10 +445,11 @@
431445
" <td>370.0</td>\n",
432446
" <td>360.0</td>\n",
433447
" <td>1097.0</td>\n",
448+
" <td>1097.0</td>\n",
434449
" </tr>\n",
435450
" </tbody>\n",
436451
"</table>\n",
437-
"<p>421 rows × 7 columns</p>\n",
452+
"<p>421 rows × 8 columns</p>\n",
438453
"</div>"
439454
],
440455
"text/plain": [
@@ -464,23 +479,23 @@
464479
"476 8 496.0 \n",
465480
"477 9 367.0 \n",
466481
"\n",
467-
" sat_math_avg_score sat_writing_avg_score sat_total_score \n",
468-
"0 404.0 363.0 1122.0 \n",
469-
"1 423.0 366.0 1172.0 \n",
470-
"2 402.0 370.0 1149.0 \n",
471-
"3 401.0 359.0 1174.0 \n",
472-
"4 433.0 384.0 1207.0 \n",
473-
".. ... ... ... \n",
474-
"466 358.0 350.0 1055.0 \n",
475-
"467 317.0 358.0 1034.0 \n",
476-
"471 444.0 433.0 1306.0 \n",
477-
"476 400.0 426.0 1322.0 \n",
478-
"477 370.0 360.0 1097.0 \n",
482+
" sat_math_avg_score sat_writing_avg_score total sat_total_score \n",
483+
"0 404.0 363.0 1122.0 1122.0 \n",
484+
"1 423.0 366.0 1172.0 1172.0 \n",
485+
"2 402.0 370.0 1149.0 1149.0 \n",
486+
"3 401.0 359.0 1174.0 1174.0 \n",
487+
"4 433.0 384.0 1207.0 1207.0 \n",
488+
".. ... ... ... ... \n",
489+
"466 358.0 350.0 1055.0 1055.0 \n",
490+
"467 317.0 358.0 1034.0 1034.0 \n",
491+
"471 444.0 433.0 1306.0 1306.0 \n",
492+
"476 400.0 426.0 1322.0 1322.0 \n",
493+
"477 370.0 360.0 1097.0 1097.0 \n",
479494
"\n",
480-
"[421 rows x 7 columns]"
495+
"[421 rows x 8 columns]"
481496
]
482497
},
483-
"execution_count": 5,
498+
"execution_count": 14,
484499
"metadata": {},
485500
"output_type": "execute_result"
486501
}
@@ -503,7 +518,7 @@
503518
},
504519
{
505520
"cell_type": "code",
506-
"execution_count": 6,
521+
"execution_count": 5,
507522
"id": "dfa972c0",
508523
"metadata": {},
509524
"outputs": [
@@ -877,7 +892,7 @@
877892
"[1000 rows x 38 columns]"
878893
]
879894
},
880-
"execution_count": 6,
895+
"execution_count": 5,
881896
"metadata": {},
882897
"output_type": "execute_result"
883898
}
@@ -889,7 +904,7 @@
889904
},
890905
{
891906
"cell_type": "code",
892-
"execution_count": 7,
907+
"execution_count": 6,
893908
"id": "283ea5f7",
894909
"metadata": {},
895910
"outputs": [
@@ -1263,7 +1278,7 @@
12631278
"[151 rows x 38 columns]"
12641279
]
12651280
},
1266-
"execution_count": 7,
1281+
"execution_count": 6,
12671282
"metadata": {},
12681283
"output_type": "execute_result"
12691284
}
@@ -1276,7 +1291,7 @@
12761291
},
12771292
{
12781293
"cell_type": "code",
1279-
"execution_count": 8,
1294+
"execution_count": 27,
12801295
"id": "ccd77861",
12811296
"metadata": {},
12821297
"outputs": [
@@ -1396,7 +1411,7 @@
13961411
"[67 rows x 2 columns]"
13971412
]
13981413
},
1399-
"execution_count": 8,
1414+
"execution_count": 27,
14001415
"metadata": {},
14011416
"output_type": "execute_result"
14021417
}
@@ -1410,7 +1425,7 @@
14101425
},
14111426
{
14121427
"cell_type": "code",
1413-
"execution_count": 9,
1428+
"execution_count": null,
14141429
"id": "85e30f1c",
14151430
"metadata": {},
14161431
"outputs": [
@@ -1421,10 +1436,10 @@
14211436
"<class 'pandas.core.frame.DataFrame'>\n",
14221437
"RangeIndex: 67 entries, 0 to 66\n",
14231438
"Data columns (total 2 columns):\n",
1424-
" # Column Non-Null Count Dtype \n",
1425-
"--- ------ -------------- ----- \n",
1426-
" 0 sat_total_score 67 non-null float64\n",
1427-
" 1 the percentage of students who receive free or reduced lunch 67 non-null float64\n",
1439+
" # Column Non-Null Count Dtype \n",
1440+
"--- ------ -------------- ----- \n",
1441+
" 0 sat_total_score 67 non-null float64\n",
1442+
" 1 frl_percent 67 non-null float64\n",
14281443
"dtypes: float64(2)\n",
14291444
"memory usage: 1.2 KB\n"
14301445
]
@@ -2304,9 +2319,6 @@
23042319
}
23052320
],
23062321
"source": [
2307-
"import plotly.io as pio\n",
2308-
"pio.renderers.default = \"jupyterlab\"\n",
2309-
"\n",
23102322
"import plotly.express as px\n",
23112323
"figure = px.scatter(df_merge_sorted,\n",
23122324
" x=\"the percentage of students who receive free or reduced lunch\",\n",
@@ -2327,7 +2339,7 @@
23272339
],
23282340
"metadata": {
23292341
"kernelspec": {
2330-
"display_name": "myenv",
2342+
"display_name": ".venv",
23312343
"language": "python",
23322344
"name": "python3"
23332345
},

0 commit comments

Comments
 (0)