Python for Scientists

Unlock the power of Python for scientific computing with our 'Python for Scientists' course, tailored for scientists and engineers aiming to excel in data manipulation, complex calculations, and data visualization.

Course Thumbnail

Essential Skills Gained

Checkmark

Understand the Python environment for scientific computing.

Checkmark

Implement data manipulation and complex calculations with Python modules.

Checkmark

Visualize scientific data using Python libraries like matplotlib.

Checkmark

Develop efficient Python scripts for real-world scientific applications.

Format

  • Instructor-led
  • 5 days with lectures and hands-on labs.

Audience

  • Scientists
  • Engineers
  • Data Analysts
  • Research Students

Description

This is a 5-day course that provides a ramp-up to using Python for scientific and mathematical computing. Starting with the basics, it progresses to the most important Python modules for working with data, from arrays to statistics, to plotting results. The material is geared towards scientists and engineers. This is an intense, hands-on, programming class. All concepts are reinforced by informal practice during the lecture followed by lab exercises. Many labs build on earlier labs which helps students retain the earlier material. Python for Programming is a practical introduction to a working programming language, not an academic overview of syntax and grammar. Students will immediately be able to use Python to complete tasks in the real world.

Calendar icon

Upcoming Course Dates

No upcoming dates. Please check back later.

Course Outline

Download PDF

The Python Environment

  1. Starting Python

  2. If the interpreter is not in your PATHs

  3. Using the interpreter

  4. Trying a few commands

  5. The help() function

  6. Running a Python script

  7. Python scripts on UNIX

  8. Python editors and IDEs

Getting Started

  1. Using variables

  2. Keywords

  3. Built-in functions

  4. Strings

  5. Single-quoted string literals

  6. Triple-quoted string literals

  7. Raw string literals

  8. Unicode literals

  9. String operators and expressions

  10. Converting among types

  11. Writing to the screen

  12. String formatting

  13. Legacy string formatting

  14. Command line parameters

  15. Reading from the keyboard

Flow Control

  1. About flow control

  2. What’s with the white space?

  3. if and elif

  4. Conditional expressions

  5. Relational and Boolean operators

  6. while loops

  7. Alternate ways to exit a loop

Lists and Tuples

  1. About Sequences

  2. Lists

  3. Tuples

  4. Indexing and slicing

  5. Iterating through a sequence

  6. Functions for all sequences

  7. Using enumerate()

  8. Operators and keywords for sequences

  9. The xrange() function

  10. Nested sequences

  11. List comprehensions

  12. Generator expressions

Working with Files

  1. Text file I/O

  2. Opening a text file

  3. The with block

  4. Reading a text file

  5. Writing a text file

  6. Binary (raw, or non-delimited) data

Dictionaries and Sets

  1. About dictionaries

  2. When to use dictionaries

  3. Creating dictionaries

  4. Getting dictionary values

  5. Iterating through a dictionary

  6. Reading file data into a dictionary

  7. Counting with dictionaries

  8. About sets

  9. Creating sets

  10. Working with sets

Functions

  1. Defining a function

  2. Function parameters

  3. Global variables

  4. Variable scope

  5. Returning values

Exception Handling

  1. Syntax errors

  2. Exceptions

  3. Handling exceptions with try

  4. Handling multiple exceptions

  5. Handling generic exceptions

  6. Ignoring exceptions

  7. Using else

  8. Cleaning up with finally

  9. Re-raising exceptions

  10. Raising a new exception

  11. The standard exception hierarchy

OS Services

  1. The os module

  2. Environment variables

  3. Launching external processes

  4. Paths, directories, and filenames

  5. Walking directory trees

  6. Dates and times

  7. Sending email

Pythonic Idioms

  1. The Zen of Python

  2. Common Python idioms

  3. Packing and unpacking

  4. Lambda functions

  5. List comprehensions

  6. Generators vs. iterators

  7. Generator expressions

  8. String tricks

Modules and Packages

  1. What is a module?

  2. The import statement

  3. Where did the .pyc file come from?

  4. Module search path

  5. Zipped libraries

  6. Creating Modules

  7. Packages

  8. Module aliases

  9. When the batteries aren’t included

Classes

  1. Defining classes

  2. Instance objects

  3. Instance attributes

  4. Methods

  5. init

  6. Properties

  7. Class data

  8. Inheritance

  9. Multiple Inheritance

  10. Base classes

  11. Special methods

  12. Pseudo-private variables

  13. Static methods

Developer Tools

  1. Program development

  2. Comments

  3. pylint

  4. Customizing pylint

  5. Unit testing

  6. The unittest module

  7. Creating a test class

  8. Establishing success or failure

  9. Startup and Cleanup

  10. Running the tests

  11. The Python debugger

  12. Starting debug mode

  13. Stepping through a program

  14. Setting breakpoints

  15. Debugging command reference

  16. Benchmarking

XML and JSON

  1. About XML

  2. Normal approaches to XML

  3. Which module to use?

  4. Getting started with ElementTree

  5. How ElementTree works

  6. Creating a new XML Document

  7. Parsing an XML Document

  8. Navigating the XML Document

  9. Using XPath

  10. Advanced XPath

iPython

  1. About iPython

  2. Features of iPython

  3. Starting iPython

  4. Tab completion

  5. Magic commands

  6. Benchmarking

  7. External commands

  8. Enhanced help

  9. Notebooks

numpy

  1. Python’s scientific stack

  2. numpy overview

  3. Creating arrays

  4. Creating ranges

  5. Working with arrays

  6. Shapes

  7. Slicing and indexing

  8. Indexing with Booleans

  9. Stacking

  10. Iterating

  11. Tricks with arrays

  12. Matrices

  13. Data types

  14. numpy functions

scipy

  1. About scipy

  2. Polynomials

  3. Vectorizing functions

  4. Subpackages

  5. Getting help

  6. Weave

A Tour of scipy subpackages

  1. cluster

  2. constants

  3. fftpack

  4. integrate

  5. interpolate

  6. io

  7. linalg

  8. ndimage

  9. odr

  10. optimize

  11. signal

  12. sparse

  13. spatial

  14. special

  15. stats

pandas

  1. About pandas

  2. Pandas architecture

  3. Series

  4. DataFrames

  5. Data Alignment

  6. Index Objects

  7. Basic Indexing

  8. Broadcasting

  9. Removing entries

  10. Time series

  11. Reading Data

matplotlib

  1. About matplotlib

  2. matplotlib architecture

  3. matplotlib Terminology

  4. matplotlib keeps state

  5. What else can you do?

Python Imaging Library

  1. The PIL

  2. Supported image file types

  3. The Image class

  4. Reading and writing

  5. Creating thumbnails

  6. Coordinate system

  7. Cropping and pasting

  8. Rotating, resizing, and flipping

  9. Enhancing

Your Team has Unique Training Needs.

Your team deserves training as unique as they are.

Let us tailor the course to your needs at no extra cost.