Skip to content

Commit 836bf84

Browse files
Include more plot points by using fillna()
Thank you, @austinbock, for pointing out that the graph could include a few more data points from back in the era when a year could include all men or all women in one of the slots! Fixes brandon-rhodes#29.
1 parent 35f8f33 commit 836bf84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Solutions-4.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@
601601
"c = cast\n",
602602
"c = c[c.n <= 3]\n",
603603
"c = c.groupby(['year', 'type', 'n']).size()\n",
604-
"c = c.unstack('type')\n",
604+
"c = c.unstack('type').fillna(0)\n",
605605
"r = c.actor / (c.actor + c.actress)\n",
606606
"r = r.unstack('n')\n",
607607
"r.plot(ylim=[0,1])"

0 commit comments

Comments
 (0)