Hi,
I just run code provided in the chapter 1.7. While df.outcome.value_counts(sort=False) yields exactly what is shown in the book's example, result of df.birthwgt_lb.value_counts(sort=False) gives me slightly different output (see below) than it is shown in book. Other than that little issue, everything is fine - all weight values for birthwgt_lb column are summarized correctly.
EDIT
Oh, and apparently I'm missing the 51 pound baby :)
EDIT
I just ran through the source code of nsfg.py it make sense now that 51 pound baby is removed by call to CleanFemPreg.
Result of running df.birthwgt_lb.value_counts(sort=False):
Hi, I just run code provided in the chapter 1.7. While
df.outcome.value_counts(sort=False)
yields exactly what is shown in the book's example, result ofdf.birthwgt_lb.value_counts(sort=False)
gives me slightly different output (see below) than it is shown in book. Other than that little issue, everything is fine - all weight values forbirthwgt_lb
column are summarized correctly.EDIT Oh, and apparently I'm missing the 51 pound baby :) EDIT I just ran through the source code of
nsfg.py
it make sense now that 51 pound baby is removed by call toCleanFemPreg
.Result of running
df.birthwgt_lb.value_counts(sort=False)
:Can someone please let me know what might be causing this?
I'm running my code using Python(3.5.2) in virtualenv(15.1.0) with installed dependencies: