... smoking: smoking is bad


When we normalise against age, suddenly we see another pattern.

  .assign(age=lambda d: np.round(d['age'] / 10) * 10)
  .groupby(['smokes', 'age'])
  .agg(p=('alive', np.mean))
  .pivot(index='age', columns='smokes', values='p')

Feedback? See an issue? Something unclear? Feel free to mention it here.

If you want to be kept up to date, consider signing up for the newsletter.