When I run this code
import pandas as pd import numpy as np def add_prop(group): births = group.births.astype(float) group[\'prop\'] = births/births.
In the IPython notebook you could also use %matplotlib inline at the top of the notebook to automatically display the created plots in the output cells.
%matplotlib inline