Python for data analysis - chapter 2 - example