From 89821e3c46e716a7f43e28cc8cac3e51518a4953 Mon Sep 17 00:00:00 2001 From: Benjamin Mako Hill Date: Mon, 10 Apr 2023 15:35:35 -0700 Subject: [PATCH 1/1] merged updates with the new code --- BabyNames.ipynb | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/BabyNames.ipynb b/BabyNames.ipynb index 8173933..775b9a1 100644 --- a/BabyNames.ipynb +++ b/BabyNames.ipynb @@ -6,19 +6,7 @@ "metadata": {}, "outputs": [], "source": [ - "NAMES_LIST = \"yob2018.txt\"\n", - "\n", - "boys = {}\n", - "girls = {}\n", - "\n", - "for line in open(NAMES_LIST, 'r').readlines():\n", - " name, gender, count = line.strip().split(\",\")\n", - " count = int(count)\n", - "\n", - " if gender == \"F\":\n", - " girls[name.lower()] = count\n", - " elif gender == \"M\":\n", - " boys[name.lower()] = count" + "from ssadata import boys, girls" ] }, { @@ -250,7 +238,8 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.4" + + "version": "3.9.2" } }, "nbformat": 4, -- 2.39.5