Python for Exploratory Computing
Lots of books are written on scientific computing, but very few deal with the much more common exploratory computing (a term coined by Fernando Perez), which represents daily tasks of many scientists and engineers that try to solve problems but are not computer scientists. This set of Notebooks is written for scientists and engineers who want to use Python programming for exploratory computing, scripting, data analysis, and visualization. Python makes many of these programming tasks quick, easy, and, probably most importantly, fun.
No prior knowledge of computer programming is assumed. Each Notebook covers a specific topic and includes a number of exercises. The exercises should take less than 4 hours to complete for each Notebook. Answers to the exercises are given at the end of the Notebook. There are two versions of each Notebook: one with and one without output cells. The Notebooks without the output cells are intended for people wanting to learn Python. Running the output cells is part of the learning process. All Notebooks and accompanying data files may be downloaded by clicking on the 'Download .zip file' button to the right. Notebooks with output cells cells have the addition _sol and can be viewed by clicking on the links below.
Notebooks can be run after you install Python and the appropriate packages. The easiest way to do this is to install an installer that includes Python and a set of the most popular packages. The most popular distribution is Anaconda (Mac, Windows, Linux). All the Notebooks on this webiste were developed with Anaconda. After installing Anaconda, start the Navigator and then launch the Jupyter Notebook, which will open the Jupyter Notebook dashboard in your webbrowser (starting in your Documents folder on Windows and your home directory on a Mac). Use the dashboard to surf to the directory where you stored your Notebooks (you can only surf to lower directories not higher directories) and click on the one you want to open.
Notebooks and accompanying videos
Basics and Plotting — Notebook 1 — Video
Arrays — Notebook 2 — Video
For loops and If/Else statements — Notebook 3 — Video
Functions — Notebook 4 — Video
Finding the Zeros of a Function — Notebook 5
Systems of linear equations — Notebook 6
Bugs — Notebook 7
Pandas and Time Series — Notebook 8 — Video
Discrete Random Variables — Notebook 9 — Video
Continuous Random Variables — Notebook 10 — Video
Distribution of the Mean and Hypothesis Tests Theorem — Notebook 11 — Video (Python 2)
Object oriented programming — Notebook 12 — Video (Python 2)
Regression I — Notebook 13
Test Notebooks 1-4 — Test Notebook 1-4
To be added soon: Regression II, ipywidgets, animations
This work is licensed under a Creative Commons Attribution 4.0 International License.