Updated the lab slightly

This commit is contained in:
Chris Proctor 2022-04-14 17:22:27 -04:00
parent 366dc32233
commit 49b3a69aa8
2 changed files with 67 additions and 58 deletions

View File

@ -128,7 +128,7 @@
},
{
"cell_type": "code",
"execution_count": 151,
"execution_count": 4,
"id": "ba09a0f8-27d9-456f-aeff-3980e3362d5b",
"metadata": {},
"outputs": [],
@ -138,7 +138,7 @@
},
{
"cell_type": "code",
"execution_count": 233,
"execution_count": 5,
"id": "a29d508a-2d9a-4d62-9ff6-7a0ecfd5eba4",
"metadata": {},
"outputs": [],
@ -161,7 +161,7 @@
},
{
"cell_type": "code",
"execution_count": 166,
"execution_count": 6,
"id": "579d8dda-ca39-48b1-8819-b17651029729",
"metadata": {},
"outputs": [
@ -401,7 +401,7 @@
"[800 rows x 12 columns]"
]
},
"execution_count": 166,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
@ -424,12 +424,12 @@
},
{
"cell_type": "code",
"execution_count": 164,
"execution_count": 7,
"id": "c9e5e4ec-b197-450c-ae2d-318006fa0a2f",
"metadata": {},
"outputs": [],
"source": [
"# YOUR CODE HERE!"
"# Your code here"
]
},
{
@ -446,7 +446,7 @@
},
{
"cell_type": "code",
"execution_count": 173,
"execution_count": 8,
"id": "9afca362-9edc-423c-981b-dc42107d5de0",
"metadata": {},
"outputs": [
@ -462,7 +462,7 @@
"Name: generation, dtype: int64"
]
},
"execution_count": 173,
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
@ -481,7 +481,7 @@
},
{
"cell_type": "code",
"execution_count": 168,
"execution_count": 9,
"id": "5fe580d0-5939-4152-9f8c-4c32d35a4479",
"metadata": {},
"outputs": [
@ -495,7 +495,7 @@
"dtype: float64"
]
},
"execution_count": 168,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
@ -514,7 +514,7 @@
},
{
"cell_type": "code",
"execution_count": 169,
"execution_count": 10,
"id": "dc69ef53-70cd-4ae0-80e7-c9c8e28de76f",
"metadata": {},
"outputs": [
@ -524,7 +524,7 @@
"0.08125"
]
},
"execution_count": 169,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
@ -553,12 +553,12 @@
},
{
"cell_type": "code",
"execution_count": 235,
"execution_count": 11,
"id": "8fbcc766-8399-4f93-a6c8-e0607250a72a",
"metadata": {},
"outputs": [],
"source": [
"# YOUR CODE HERE"
"# Your code here"
]
},
{
@ -571,12 +571,12 @@
},
{
"cell_type": "code",
"execution_count": 236,
"execution_count": 12,
"id": "b7f910c8-3d40-49ae-b270-678734c04100",
"metadata": {},
"outputs": [],
"source": [
"# YOUR CODE HERE"
"# Your code here"
]
},
{
@ -589,12 +589,12 @@
},
{
"cell_type": "code",
"execution_count": 237,
"execution_count": 13,
"id": "f3891188-a85f-4089-8388-d4d81c7438ad",
"metadata": {},
"outputs": [],
"source": [
"# YOUR CODE HERE"
"# Your code here"
]
},
{
@ -612,7 +612,7 @@
},
{
"cell_type": "code",
"execution_count": 180,
"execution_count": 14,
"id": "12c0c6c9-c07b-4183-82f6-5e346c74aac9",
"metadata": {},
"outputs": [
@ -852,7 +852,7 @@
"[65 rows x 12 columns]"
]
},
"execution_count": 180,
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
@ -872,7 +872,7 @@
},
{
"cell_type": "code",
"execution_count": 181,
"execution_count": 15,
"id": "5d089acf-7b76-4f91-8803-42a4a9a11e3e",
"metadata": {},
"outputs": [
@ -893,7 +893,7 @@
"Name: type, Length: 800, dtype: bool"
]
},
"execution_count": 181,
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
@ -912,7 +912,7 @@
},
{
"cell_type": "code",
"execution_count": 183,
"execution_count": 16,
"id": "510fa0fc-2b38-4725-9bbf-ec57d62792be",
"metadata": {},
"outputs": [
@ -1370,7 +1370,7 @@
"789 44 46 28 6 False "
]
},
"execution_count": 183,
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
@ -1390,7 +1390,7 @@
},
{
"cell_type": "code",
"execution_count": 185,
"execution_count": 17,
"id": "05d4c5c2-c6b4-4795-9799-c884b15445a1",
"metadata": {},
"outputs": [
@ -1559,7 +1559,7 @@
"676 95 135 105 5 False "
]
},
"execution_count": 185,
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
@ -1589,7 +1589,7 @@
},
{
"cell_type": "code",
"execution_count": 195,
"execution_count": 18,
"id": "198cb0c6-3f43-43c2-9eee-3939c12ea537",
"metadata": {},
"outputs": [],
@ -1615,7 +1615,7 @@
},
{
"cell_type": "code",
"execution_count": 196,
"execution_count": 19,
"id": "8a8c1ad6-4c1e-4996-ab5e-5212dadb1851",
"metadata": {},
"outputs": [],
@ -1640,7 +1640,7 @@
},
{
"cell_type": "code",
"execution_count": 194,
"execution_count": 20,
"id": "315682ae-7d54-4d78-9a63-d23c83ba1576",
"metadata": {},
"outputs": [],
@ -1664,7 +1664,7 @@
},
{
"cell_type": "code",
"execution_count": 198,
"execution_count": 21,
"id": "069ea0ab-eff6-4985-9f46-db956fe1df91",
"metadata": {},
"outputs": [
@ -1693,7 +1693,7 @@
"Name: speed, dtype: float64"
]
},
"execution_count": 198,
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
@ -1712,7 +1712,7 @@
},
{
"cell_type": "code",
"execution_count": 205,
"execution_count": 22,
"id": "5c420c0e-b5d2-49ae-ab98-3305ee076169",
"metadata": {},
"outputs": [
@ -1884,7 +1884,7 @@
"Dragon 83.312500 112.125000 86.375000"
]
},
"execution_count": 205,
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
@ -1904,7 +1904,7 @@
},
{
"cell_type": "code",
"execution_count": 202,
"execution_count": 23,
"id": "444a580d-e70c-48a1-bf87-77f98b8c9f85",
"metadata": {},
"outputs": [
@ -1931,7 +1931,7 @@
"Name: legendary, dtype: float64"
]
},
"execution_count": 202,
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
@ -1948,12 +1948,23 @@
"source": [
"#### Your turn\n",
"\n",
"**1.4.0.** `income` records peoples' annual income, in the following bands. `sleep` records the average hours of sleep someone gets per night. Is there a difference in the average hours of sleep by income level?"
"**1.4.0.** `income` records peoples' annual income, in the following bands. `sleep` records the average hours of sleep someone gets per night. Is there a difference in the average hours of sleep by income level?\n",
"\n",
"| number | annual income, in $1000 | \n",
"| ------ | ----------- |\n",
"| 1 | Less than 10 |\n",
"| 2 | 10-15 |\n",
"| 3 | 15-20 |\n",
"| 4 | 20-25 |\n",
"| 5 | 25-35 |\n",
"| 6 | 35-50 |\n",
"| 7 | 50-75 |\n",
"| 8 | More than 75 |"
]
},
{
"cell_type": "code",
"execution_count": 211,
"execution_count": 24,
"id": "75c1ac4f-3914-4c0a-a156-2e084002df66",
"metadata": {},
"outputs": [],
@ -1971,7 +1982,7 @@
},
{
"cell_type": "code",
"execution_count": 213,
"execution_count": 25,
"id": "d46df8a1-bbc2-45a4-9be1-cee1858cbf21",
"metadata": {},
"outputs": [],
@ -1979,16 +1990,6 @@
"# YOUR CODE HERE"
]
},
{
"cell_type": "code",
"execution_count": 231,
"id": "08332242-f470-41b2-b542-b29395b3b52e",
"metadata": {},
"outputs": [],
"source": [
"people[\"education\"] = people[\"education\"].map({\"none_completed\": 1, \"high_school\": 2, \"some_college\": 3, \"college\": 4})"
]
},
{
"cell_type": "markdown",
"id": "931d602b-ddf4-4c8b-80e0-f886267cce76",
@ -2005,7 +2006,7 @@
},
{
"cell_type": "code",
"execution_count": 238,
"execution_count": 26,
"id": "5ce066fe-f81d-4b78-a394-c5c2f4dc9f46",
"metadata": {},
"outputs": [
@ -2015,7 +2016,7 @@
"<AxesSubplot:>"
]
},
"execution_count": 238,
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
},
@ -2046,7 +2047,7 @@
},
{
"cell_type": "code",
"execution_count": 240,
"execution_count": 27,
"id": "6ac22395-351f-45c3-8ecb-7c7469d2347a",
"metadata": {},
"outputs": [
@ -2056,7 +2057,7 @@
"<AxesSubplot:xlabel='attack', ylabel='defense'>"
]
},
"execution_count": 240,
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
},
@ -2094,6 +2095,14 @@
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "ee30c851-14b1-4901-9182-4304d54d53a6",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {

12
poetry.lock generated
View File

@ -466,7 +466,7 @@ ui-tests = ["build"]
[[package]]
name = "jupyterlab-pygments"
version = "0.2.1"
version = "0.2.2"
description = "Pygments theme using JupyterLab CSS variables"
category = "main"
optional = false
@ -1007,7 +1007,7 @@ python-versions = ">=3.5"
[[package]]
name = "soupsieve"
version = "2.3.2"
version = "2.3.2.post1"
description = "A modern CSS selector implementation for Beautiful Soup."
category = "main"
optional = false
@ -1355,8 +1355,8 @@ jupyterlab = [
{file = "jupyterlab-3.3.3.tar.gz", hash = "sha256:294d67126015ba397f6b1c80563deec862e47e042623851bbe2a7d870d69eb6a"},
]
jupyterlab-pygments = [
{file = "jupyterlab_pygments-0.2.1-py2.py3-none-any.whl", hash = "sha256:05f8056a18fec9ebef01f705443d81edb16bb03d27371f23c0ae135a85a76029"},
{file = "jupyterlab_pygments-0.2.1.tar.gz", hash = "sha256:121da770930e348895f89d6bdfce7e7e6a8bb574162923f9c9ef5a20c61619c6"},
{file = "jupyterlab_pygments-0.2.2-py2.py3-none-any.whl", hash = "sha256:2405800db07c9f770863bcf8049a529c3dd4d3e28536638bd7c1c01d2748309f"},
{file = "jupyterlab_pygments-0.2.2.tar.gz", hash = "sha256:7405d7fde60819d905a9fa8ce89e4cd830e318cdad22a0030f7a901da705585d"},
]
jupyterlab-server = [
{file = "jupyterlab_server-2.12.0-py3-none-any.whl", hash = "sha256:db5d234955c5c2684f77a064345712f071acf7df31f0d8c31b420b33b09d6472"},
@ -1840,8 +1840,8 @@ sniffio = [
{file = "sniffio-1.2.0.tar.gz", hash = "sha256:c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de"},
]
soupsieve = [
{file = "soupsieve-2.3.2-py3-none-any.whl", hash = "sha256:a714129d3021ec17ce5be346b1007300558b378332c289a1a20e7d4de6ff18a5"},
{file = "soupsieve-2.3.2.tar.gz", hash = "sha256:0bcc6d7432153063e3df09c3ac9442af3eba488715bfcad6a4c38ccb2a523124"},
{file = "soupsieve-2.3.2.post1-py3-none-any.whl", hash = "sha256:3b2503d3c7084a42b1ebd08116e5f81aadfaea95863628c80a3b774a11b7c759"},
{file = "soupsieve-2.3.2.post1.tar.gz", hash = "sha256:fc53893b3da2c33de295667a0e19f078c14bf86544af307354de5fcf12a3f30d"},
]
stack-data = [
{file = "stack_data-0.2.0-py3-none-any.whl", hash = "sha256:999762f9c3132308789affa03e9271bbbe947bf78311851f4d485d8402ed858e"},