#!/usr/bin/env python # coding: utf-8 # In[1]: from __future__ import print_function, division import nsfg3 # In[2]: df = nsfg3.ReadFemResp2002() # In[3]: sum(df.evrmarry) # In[5]: len(df[(df.cmbirth >= 301) & (df.cmbirth <= 1164)]) # In[6]: len(df[(df.cmmarrhx >= 301) & (df.cmmarrhx <= 1164)]) # In[7]: len(df[(df.cmmarrhx.isnull())]) # In[8]: df.cmintvw.value_counts().sort_index() # In[9]: df.finalwgt.value_counts().sort_index() # In[ ]: