I've entered the correct answer for the first exercise.
Question: Select the birthord column, print the value counts, and compare to results published in the codebook
Answer: preg.outcome.value_counts().sort_index()
However, when I ran the code, it showed me the NameError. I assumed that preg has been pre-defined. Did I miss any steps? Thanks!
NameError Traceback (most recent call last)
in ()
----> 1 preg.birthord.value_counts().sort_index()
NameError: name 'preg' is not defined
I've entered the correct answer for the first exercise. Question: Select the birthord column, print the value counts, and compare to results published in the codebook Answer: preg.outcome.value_counts().sort_index()
However, when I ran the code, it showed me the NameError. I assumed that preg has been pre-defined. Did I miss any steps? Thanks!
NameError Traceback (most recent call last)