projects
/
babynames-cdsw
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
30fcfdc
)
merged updates with the new code
author
Benjamin Mako Hill
<mako@atdot.cc>
Mon, 10 Apr 2023 22:35:35 +0000
(15:35 -0700)
committer
Benjamin Mako Hill
<mako@atdot.cc>
Mon, 10 Apr 2023 22:35:35 +0000
(15:35 -0700)
BabyNames.ipynb
patch
|
blob
|
history
diff --git
a/BabyNames.ipynb
b/BabyNames.ipynb
index 8173933d3ae801a07001de18d27650e4f6b54c93..775b9a135d75906347609167a1ec8de59b7fc3d1 100644
(file)
--- a/
BabyNames.ipynb
+++ b/
BabyNames.ipynb
@@
-6,19
+6,7
@@
"metadata": {},
"outputs": [],
"source": [
"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",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.7.4"
+
+ "version": "3.9.2"
}
},
"nbformat": 4,
}
},
"nbformat": 4,
Benjamin Mako Hill
||
Want to submit a patch?