Summary and Schedule
This lesson is an introduction to programming in Python 3 for people with little or no previous programming experience. It uses plotting as its motivating example and is designed to be used in both Data Carpentry and Software Carpentry workshops. This lesson references JupyterLab but can be taught using alternative Python 3 interpreters as well (e.g., repl.it, Anaconda).
Prerequisites
Learners need to understand what files and directories are, what a working directory is, and how to start a Python interpreter.
Learners must install Python 3 before the class starts.
Learners must get the gapminder data before class starts: please download and unzip the file python-novice-gapminder-data.zip.
Please see the setup instructions for more details.
| Setup Instructions | Download files required for the lesson | |
| Duration: 00h 00m | 1. Running and Quitting | How can I run Python programs? |
| Duration: 00h 30m | 2. Variables and Assignment | How can I store data in programs? |
| Duration: 01h 00m | 3. (Talk) The Zen of Python | |
| Duration: 01h 20m | 4. Morning Coffee | |
| Duration: 01h 30m | 5. Data Types and Type Conversion |
What kinds of data do programs store? How can I convert one type to another? |
| Duration: 02h 00m | 6. Built-in Functions and Help |
How can I use built-in functions? How can I find out what they do? What kind of errors can occur in programs? |
| Duration: 02h 30m | 7. Lunch Break | |
| Duration: 03h 30m | 8. Libraries |
How can I use software that other people have written? How can I find out what that software does? |
| Duration: 04h 00m | 9. (Talk) Third Party Libraries | |
| Duration: 04h 20m | 10. Afternoon Break | |
| Duration: 04h 30m | 11. Reading Tabular Data into DataFrames | How can I read tabular data? |
| Duration: 05h 00m | 12. Pandas DataFrames | How can I do statistical analysis of tabular data? |
| Duration: 05h 30m | 13. Plotting |
How can I plot my data? How can I save my plot for publishing? |
| Duration: 06h 00m | 14. (Talk) Git Control System | |
| Duration: 06h 20m | 15. Day 1 Recap | |
| Duration: 06h 35m | 16. Lists | How can I store multiple values? |
| Duration: 07h 10m | 17. Dictionaries | How is a dictionary different from a list? |
| Duration: 07h 55m | 18. Morning Coffee | |
| Duration: 08h 10m | 19. For Loops | How can I make a program do many things? |
| Duration: 09h 10m | 20. Lunch Break | |
| Duration: 10h 10m | 21. Conditionals | How can programs do different things for different data? |
| Duration: 10h 55m | 22. (Talk) Clean Code | |
| Duration: 11h 15m | 23. Afternoon Break | |
| Duration: 11h 25m | 24. Looping Over Data Sets | How can I process many data sets with a single command? |
| Duration: 11h 45m | 25. Writing Functions | How can I create my own functions? |
| Duration: 12h 45m | 26. Variable Scope |
How do function calls actually work? How can I determine where errors occurred? |
| Duration: 13h 00m | 27. Programming Style |
How can I make my programs more readable? How do most programmers format their code? How can programs check their own operation? |
| Duration: 13h 30m | 28. (Talk) Libraries with Compiled Code | |
| Duration: 13h 50m | 29. Feedback | How did the class go? |
| Duration: 14h 05m | 30. Wrap-Up |
What have we learned? What else is out there and where do I find it? |
| Duration: 14h 25m | Finish |
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.
Getting the Data
The data we will be using is taken from the gapminder dataset. To obtain it, download and unzip the file python-novice-gapminder-data.zip. In order to follow the presented material, you should launch the JupyterLab server in the root directory (see Starting JupyterLab).
Installing Python Using Anaconda
Please refer to the Python section of the workshop website for installation instructions.
(Fallback)
If you are unable to install Python and Anaconda on your computer, you can use the following online services to run Python code:
- (With an RWTH SSO Login) https://jupyter.rwth-aachen.de/hub/login
- https://jupyter.org/try (You will likely not be able to save your work)