Coursera Data Science toolkit, final, Problem 3