Summary and Schedule
Python is a general purpose programming language that is useful for writing scripts to work effectively and reproducibly with data.
For Instructors
If you are teaching this lesson in a workshop, please see the Instructor notes.
| Setup Instructions | Download files required for the lesson | |
| Duration: 00h 00m | 1. Getting Started |
How can I identify and use key features of JupyterLab to create and
manage a Python notebook? How do I run Python code in JupyterLab, and how can I see and interpret the results? :::::::::::::::::::::::::::::::::::::::::::::::::: |
| Duration: 00h 20m | 2. Data visualization with Pandas and Matplotlib |
How do you start exploring and visualizing data using Python? How can you make and customize plots? |
| Duration: 01h 50m | 3. Exploring and understanding data |
How can I do exploratory data analysis in Python? How do I get help when I am stuck? What impact does an object’s type have on what I can do with it? How are expressions evaluated and values assigned to variables? |
| Duration: 03h 30m | 4. Indexing, Slicing and Subsetting DataFrames |
How can I access specific data within my data set? How can Python and Pandas help me to analyse my data? |
| Duration: 04h 30m | 5. Combining DataFrames |
Can I work with data from multiple sources? How can I combine data from different data sets? |
| Duration: 05h 15m | 6. Data Workflows and Automation |
Can I automate operations in Python? What are functions and why should I use them? |
| Duration: 06h 45m | Finish |
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.
Data
Data for this lesson is from the Portal Project Teaching Database. Specifically, we use the following data files:
Installing Python and JupyterLab using Pixi
Python is a popular language for scientific computing, and great for general-purpose programming as well. Installing all of the scientific packages we use in the lesson individually can be a bit cumbersome, and therefore recommend using Pixi by prefix.dev.
Regardless of how you choose to install it, please make sure you install Python version 3.x (e.g., 3.10 is fine and will continue to receive security patches unitl 2026-OCT-04).
Installing Pixi
Select your operating system from the options below.
Open https://pixi.sh/latest/installation/ in your web browser.
Under Installation, select Windows.
Open the Command Prompt, paste the following command, and press Enter.
- Close your Command Prompt window.
Open https://pixi.sh/latest/installation/ in your web browser.
Under Installation, select “Linux & macOS”.
Open the Terminal, paste the following command, and press Return.
If your system doesn’t have curl, you can use wget:
- Close your Terminal window.
Add Python and required libraries
Now that you’ve installed Pixi, we can install Python, JupyterLab, and the required libraries.
- Open your Terminal or Command Prompt. Move to your Desktop folder. There, create a new project with Pixi, which we’ll call python-intro
- Move intro your project and add Python as a dependency of your Pixi project
- Add also JupyterLab and the other required packages
Launch a Jupyter notebook
After installation, in the Terminal or Command Prompt you have open, launch a Jupyter notebook by typing this command:
The notebook should open automatically in your browser. If it does not or you wish to use a different browser, open this link: http://localhost:8888.
Leave terminal used to launch Jupyter open
Jupyter depends on a server running in the background associated with the window used to launch it. Closing that window will results in web interface errors in the web interface. When done, you can either close the terminal or shut down the server using CTRL+C and submitting y within 5 seconds if the terminal is needed for other tasks.
For a brief introduction to Jupyter Notebooks, please consult our Introduction to Jupyter Notebooks page.