Summary and Setup
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
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, the University of Manchester also maintains a Jupyter instance, for which an active University of Manchester account is required, which we recommend you use for this training course.
If you would prefer to install something on your machine yourself, we recommend installing Anaconda, a Python distribution that comes with everything we need for the lesson. Detailed installation instructions for this and other Python interfaces 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-pythonon your Desktop or in the Jupyter instance opened above. - Move or upload your 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
If you have launched the Jupyter instance as described above, then there’s no need for you to do anything further.
If you have downloaded or have your own Python interface already and are having problems starting or accessing it, there are various instructions in the setup page for the Carpentries course Programming for Python for launching Python interfaces; we would suggest looking there for help or asking an instructor or helper for assistance.