diff --git a/f23/Gurmail_Lecture_Notes/24_Comprehensions/lec_24_comprehensions.ipynb b/f23/Gurmail_Lecture_Notes/24_Comprehensions/lec_24_comprehensions.ipynb index 6585696055b28dd13dc4720d0bbe5ed6e0b79a1f..1e4c8df8318d5d61277f857d6e56c729be75dbe7 100644 --- a/f23/Gurmail_Lecture_Notes/24_Comprehensions/lec_24_comprehensions.ipynb +++ b/f23/Gurmail_Lecture_Notes/24_Comprehensions/lec_24_comprehensions.ipynb @@ -1119,9 +1119,8 @@ " 'Zip Code',\n", " 'Latitude',\n", " 'Longitude',\n", - " 'Pet owner',\n", " 'Pizza topping',\n", - " 'Pet owner',\n", + " 'Cats or dogs',\n", " 'Runner',\n", " 'Sleep habit',\n", " 'Procrastinator',\n", @@ -1185,36 +1184,36 @@ { "data": { "text/plain": [ - "[{'section': 'COMP SCI 220:LAB345, COMP SCI 220:LEC004',\n", - " 'Lecture': 'LEC004',\n", - " 'Age': None,\n", + "[{'section': 'COMP SCI 220:LEC003, COMP SCI 220:LAB333',\n", + " 'Lecture': 'LEC003',\n", + " 'Age': 19,\n", " 'Primary major': 'Other (please provide details below).',\n", - " 'Other Primary Major': None,\n", + " 'Other Primary Major': 'Atmospheric and Oceanic Science',\n", " 'Other majors': None,\n", - " 'Zip Code': '53,706',\n", - " 'Latitude': '22.5726',\n", - " 'Longitude': '88.3639',\n", - " 'Pet owner': 'No',\n", - " 'Pizza topping': 'pepperoni',\n", + " 'Zip Code': '53703',\n", + " 'Latitude': '44.256',\n", + " 'Longitude': '-88.409',\n", + " 'Pizza topping': 'basil/spinach',\n", + " 'Cats or dogs': 'cat',\n", " 'Runner': 'No',\n", - " 'Sleep habit': 'night owl',\n", + " 'Sleep habit': 'early bird',\n", " 'Procrastinator': 'Yes',\n", - " 'Song': 'Island in the Sun - Harry Belafonte'},\n", - " {'section': 'COMP SCI 220:LEC003, COMP SCI 220:LAB332',\n", - " 'Lecture': 'LEC001',\n", + " 'Song': 'Kanye'},\n", + " {'section': 'COMP SCI 220:LAB344, COMP SCI 220:LEC004',\n", + " 'Lecture': 'LEC004',\n", " 'Age': 19,\n", - " 'Primary major': 'Engineering: Mechanical',\n", + " 'Primary major': 'Engineering: Biomedical',\n", " 'Other Primary Major': None,\n", " 'Other majors': None,\n", - " 'Zip Code': '53,703',\n", - " 'Latitude': '44.5876',\n", - " 'Longitude': '-71.9466',\n", - " 'Pet owner': 'No',\n", - " 'Pizza topping': 'pepperoni',\n", + " 'Zip Code': '53711',\n", + " 'Latitude': '51.5072',\n", + " 'Longitude': '-0.1257',\n", + " 'Pizza topping': 'Other',\n", + " 'Cats or dogs': 'dog',\n", " 'Runner': 'No',\n", " 'Sleep habit': 'night owl',\n", " 'Procrastinator': 'Yes',\n", - " 'Song': 'No role modelz by J. Cole'}]" + " 'Song': 'Eyes Closed by Ed Sheeran\\xa0'}]" ] }, "execution_count": 36, @@ -1283,7 +1282,7 @@ { "data": { "text/plain": [ - "19.71" + "19.51" ] }, "execution_count": 38, @@ -1314,7 +1313,7 @@ { "data": { "text/plain": [ - "19.84" + "18.93" ] }, "execution_count": 39, @@ -1344,7 +1343,21 @@ { "data": { "text/plain": [ - "['night owl', 'night owl']" + "['early bird',\n", + " 'no preference',\n", + " 'night owl',\n", + " 'night owl',\n", + " 'night owl',\n", + " 'early bird',\n", + " 'night owl',\n", + " 'night owl',\n", + " 'early bird',\n", + " 'night owl',\n", + " 'night owl',\n", + " 'early bird',\n", + " 'night owl',\n", + " 'night owl',\n", + " 'night owl']" ] }, "execution_count": 40, @@ -1385,7 +1398,7 @@ { "data": { "text/plain": [ - "{'LEC004': 177, 'LEC001': 268, 'LEC002': 177, 'LEC003': 166}" + "{'LEC003': 230, 'LEC004': 208, 'LEC005': 71, 'LEC001': 258, 'LEC002': 252}" ] }, "execution_count": 41, @@ -1406,7 +1419,7 @@ { "data": { "text/plain": [ - "{'LEC004': 177, 'LEC001': 268, 'LEC002': 177, 'LEC003': 166}" + "{'LEC003': 230, 'LEC004': 208, 'LEC005': 71, 'LEC001': 258, 'LEC002': 252}" ] }, "execution_count": 42, @@ -1434,8 +1447,7 @@ { "data": { "text/plain": [ - "['No',\n", - " 'Yes',\n", + "['Yes',\n", " 'Yes',\n", " 'No',\n", " 'Yes',\n", @@ -1446,7 +1458,8 @@ " 'No',\n", " 'No',\n", " 'No',\n", - " 'Yes',\n", + " 'No',\n", + " 'No',\n", " 'No',\n", " 'No']" ] @@ -1490,7 +1503,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "{'LEC004': 19, 'LEC001': 19, 'LEC002': 19.0, 'LEC003': 19}\n" + "{'LEC003': 19, 'LEC004': 19, 'LEC005': 18.0, 'LEC001': 19.0, 'LEC002': 19.0}\n" ] } ], @@ -1523,7 +1536,7 @@ { "data": { "text/plain": [ - "{'LEC004': 19, 'LEC001': 19, 'LEC002': 19.0, 'LEC003': 19}" + "{'LEC003': 19, 'LEC004': 19, 'LEC005': 18.0, 'LEC001': 19.0, 'LEC002': 19.0}" ] }, "execution_count": 46, @@ -1553,7 +1566,7 @@ { "data": { "text/plain": [ - "{'LEC004': 26, 'LEC001': 30, 'LEC002': 69, 'LEC003': 30}" + "{'LEC003': 27, 'LEC004': 40, 'LEC005': 39, 'LEC001': 32, 'LEC002': 30}" ] }, "execution_count": 47, @@ -1738,21 +1751,23 @@ { "data": { "text/plain": [ - "{17: 2,\n", - " 18: 189,\n", - " 19: 235,\n", - " 20: 162,\n", - " 21: 75,\n", - " 22: 33,\n", - " 23: 15,\n", + "{17: 15,\n", + " 18: 253,\n", + " 19: 358,\n", + " 20: 165,\n", + " 21: 89,\n", + " 22: 28,\n", + " 23: 19,\n", " 24: 7,\n", " 25: 5,\n", - " 26: 8,\n", - " 28: 3,\n", + " 26: 2,\n", + " 27: 2,\n", + " 28: 1,\n", " 29: 1,\n", " 30: 2,\n", - " 33: 1,\n", - " 69: 1}" + " 32: 1,\n", + " 39: 1,\n", + " 40: 1}" ] }, "execution_count": 53, @@ -1781,21 +1796,21 @@ { "data": { "text/plain": [ - "['Tunak Tunak Tun - Daler Mehndi',\n", - " '\"Whats good\" by tyler the creator',\n", - " '\\xa0biggest bird',\n", - " 'robbery by juice world\\xa0',\n", - " 'Pursuit of happiness- kid cud',\n", - " 'El Entierro de los gatos',\n", - " 'the lakes -Taylor Swift',\n", - " 'Good To Me by Seventeen',\n", - " 'Kwabs - Walk',\n", - " \"Hold On, We're Going Home\",\n", - " 'your song Elton John\\xa0',\n", - " 'guerrilla',\n", - " 'Wilshire - Tyler the Creator',\n", - " 'How are you true - Cage the Elephant',\n", - " 'The Greatest - Rod Wave\\xa0']" + "['Do Not Disturb - Drake',\n", + " 'Cupid de Locke - the Smashing Pumpkins',\n", + " 'Shed a light',\n", + " \"Bang Bang - K'NAAN\",\n", + " 'I Wanna Dance with Somebody by Whitney Houston',\n", + " 'Counting Stars by One Republic',\n", + " 'Red Eye\\xa0\\n\\nJustin Bieber',\n", + " 'Dakiti - Bad Bunny',\n", + " 'Dance Monkey - Tones and I',\n", + " 'A Sky Full Of Stars- Coldplay',\n", + " 'Starships by Nicki Minaj',\n", + " 'Build Me Up Buttercup by The Foundations',\n", + " 'Eventually by Tame Impala',\n", + " 'Clean by Taylor Swift',\n", + " 'Back to December by Taylor Swift']" ] }, "execution_count": 54,