Curtin Institute for Data Science adaptation of the Software Carpentries and Data Carpentries Python lessons.
The best way to learn how to program is to do something useful, so this introduction to Python is built around a common scientific task: data analysis.
- Introduction to the Workshop and Tools
- Python Fundamentals
- Analysing Patient Data
- Visualising Tabular Data
- Storing Multiple Values in Lists
- Repeating Actions with Loops
- Analysing Data from Multiple Files
- Making Choices
- Creating Functions
- Data Analysis with Pandas
Prior to attending this workshop, please follow the below instructions to setup your personal laptop. Ensure that you have administrator permissions if you are using a corporate laptop.
The local setup involves installing 4 things:
- Python
- Git
- VSCode
- VSCode Python & Jupyter extensions You may be able to skip installing git if you already have it installed from the git workshop
The full setup instructions are: Python
-
Navigate to the website https://www.python.org/downloads/ with your web browser.
-
Download Python 3.13 (3.13.7 is fine) for your operating system
-
Run the installer, following all prompts using the default settings Git
-
Navigate to the website https://git-scm.com/downloads with your web browser
-
Download git for your operating system
-
Run the installer, following all prompts using the default settings
VSCode -
Navigate to the website https://code.visualstudio.com/ with your web browser.
-
Download Visual Studio Code for your specific platform/Operating System.
-
Run the Visual Studio Code Installer and follow all prompts.
-
Open Visual Studio Code, navigate to the File Explorer and clone this repository with the following repository name
https://github.com/CurtinIDS/CIDS_Carpentries_Pythoninto your preferred folder destination. -
Navigate to the Extension sidebar then search for and install the Python and Jupyter extensions.
-
Enter the Visual Studio Code Command Pallette using
Ctrl + Shift + P(Windows) orCommand + Shift + P(MacOS) and locatePython: Create Environment. -
Select
venv. -
Select
Python 3.13. (the version you just installed) -
When asked to "Select dependencies to install", click the box next to requirements.txt and click "ok"
ONLY if you didnt do the step above when you needed to:
- Open Command Prompt or Terminal within Visual Studio Code using
Ctrl + J(Windows) orCommand + J(MacOS). Make sure the "Terminal" tab is selected, and you're in the previuously cloned directory - Activate the created environment using the following command.
Windows (powershell):
.\.venv\Scripts\Activate.ps1
Mac/Linux:source ./venv/bin/activate - Run the following command to install dependencies while in the activated environment.
pip install -r requirements.txt
If you were unable to complete the above steps, you may alternatively access the workshop material using Google Colaboratory. Please ensure that you have a Google Account.
- Episode 1 - Python Fundamentals
- Episode 2 - Analysing Patient Data
- Episode 3 - Visualising Tabular Data
- Episode 4 - Storing Multiple Values in Lists
- Episode 5 - Repeating Actions with Loops
- Episode 6 - Analysing Data from Multiple Files
- Episode 7 - Making Choices
- Epsiode 8 - Creating Functions
- Episode 9 - Data Analysis with Pandas
If you wish to contribute, it's recommended to add the included pre-commit to your hooks.
Once you've cloned, in a Terminal window opened within the main repo directory, run the following:
cp build_scripts/pre-commit .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
This will do the following every time you commit:
- Any updated notebooks will have a colab version made and placed in
notebooks_colaband include these in your commit - Clear the cells of all notebooks before uploading






