The main goal of this course is to introduce budding and established economists to the world of Python. It is truly that: a world unto itself. It would be impossible to effectively cover all of the topics in this course in 10 hours. However, computer programming is a hands-on endeavor, a craft that must be practiced. To that end, this course will try to introduce you to certain aspects of the Python ecosystem that might be useful for an economist, while providing resources for home study and direction towards other resources. At the same time, it will attempt to illuminate some of the more frustrating aspects and to speed up the incorporation of open source software into your workflow. In summary, this course will help you to set-up your Python environment, introduce the basic tenants of Python programming style and syntax, and touch on some more advanced topics in the hopes of giving you a sense of what may be possible in Python.
The course will be made up of lecture and homework. The lectures will cover basic theory and ideas, while the homework will put into practice the ideas from the course. All of the course materials are provided in the form of IPython notebooks (except for the slides, which are pdf) and are fully available on the web with solutions to exercises. It is strongly encouraged that you do the homework in order to learn Python programming. Without practicle application, you will not retain much from the course.
The course will be organized into five, two hour sessions.
Introduction to Python and Open Source Software. This session introduces Python as an open source, high level programming language, as well as a community. By the end of the session, you should be familiar with the following necessary (or at least useful) components for being a participating member of the Python community:
Additionally, this session will introduce Python style and syntax, data types, modules and packages, the standard workflow, objects and object oriented programming, documentation for collaboration, as well as some basic examples. By the end of this session you should feel comfortable setting up and working in your new Python environment.
Introduction to the Most Used Modules. This session focuses on some of the most useful modules, including NumPy, SciPy, Matplotlib, and Pandas. All of the features discussed will be introduced using basic examples. The main topics covered will be the following:
This session is simply meant to introduce the main features of the big four modules and give students time to become more familar with simple Python programs. By the end of this session you should be comfortable enough with the basic Python interface to know what modules you need to import to do basic calculation, data entry, and data visualization.