Summary and Schedule
Python supports a large, and growing, informal network of developers – each creating tools that are aimed at solving the needs of their research, or business, community. One of the benefits of using python is the opportunity it gives you to tap into this shared development network, to build on and use the developments that others have made.
This course is designed to introduce you to some of the different libraries and tools that are available for python. The lessons begin with a reminder of the python essentials. It then introduces the concept of JSON formatted data and dictionaries, defensive programming, numpy and matplotlib usage, how to deal with physical quantities and a short introduction to the pandas library.
Prerequisites
This course follows on from lessons 1-8 of the Python introduction course, so we recommend you complete these first.
All material in these lessons pertain to Python 3.
Setup Instructions | Download files required for the lesson | |
Duration: 00h 00m | 1. Python Basics Recap | Python Refresher |
Duration: 00h 00m | 2. Dictionaries |
How can I work with relational datasets? How can I access remote data directly in my scripts? |
Duration: 00h 00m | 3. Numpy and Matplotlib Essential |
How do I select data within tables for processing? How can I load different data formats? |
Duration: 00h 00m | 4. Software Package Management |
How can I load new python libraries? How can I deal with libraries which have competing software requirements How can I record the python libraries that I use for my work? |
Duration: 00h 00m | 5. Defensive Programming |
How can I catch errors in my data? How can I make best use of error messages? |
Duration: 00h 00m | 6. Units and Quantities | How can I ensure consistent units in my code? |
Duration: 00h 00m | 7. Pandas Essential | How can I work with spreadsheet style datasets? |
Duration: 00h 00m | Finish |
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.
Setup
This lesson is designed to be run on a personal computer. All of the software and data used in this lesson are freely available online, and instructions on how to obtain them are provided below.
Install Python
In this lesson, we will be using Python 3 with some of its most popular scientific libraries. Although one can install a plain-vanilla Python and all required libraries by hand, we recommend installing Anaconda, a Python distribution that comes with everything we need for the lesson. Detailed installation instructions for various operating systems can be found on The Carpentries template website for workshops and in Anaconda documentation.
Obtain lesson materials
- Download python-intermediate-data.zip
- Create a folder called
swc-python
on your Desktop. - Move downloaded file to
swc-python
. - Unzip the file.
You should see a folder called data
in the
swc-python
directory on your Desktop.
Launch Python Interface
We recommend following the instructions in the setup page for Programming for Python for launching the python interface.