Source: https://scholar.harvard.edu/files/ambell/files/python_for_economists.pdf