Course Overview

Geared for scientists and engineers with limited practical programming background or experience, Applied Python for Data Science & Engineering is a hands-on introductory-level course that provides a ramp-up to using Python for scientific and mathematical computing. Students will explore basic Python scripting skills and concepts, and then explore the most important Python modules for working with data, from arrays, to statistics, to plotting results. Prior scripting experience is helpful.

Key Learning Areas

This course is approximately 50% hands-on, combining expert lecture, real-world demonstrations and group discussions with machine-based practical labs and exercises.  Our engaging instructors and mentors are highly experienced practitioners who bring years of current "on-the-job" experience into every classroom.  Working in a hands-on learning environment, guided by our expert team, attendees will learn how to:

  • Learn essentials Python scripting methods to create and run basic programs
  • Design and code modules and classes
  • Implement and run unit tests
  • Use benchmarks and profiling to speed up programs
  • Process XML, JSON, and CSV
  • Manipulate arrays with NumPy
  • Get a grasp of the diversity of subpackages that make up SciPy
  • Use Series and Dataframes with Pandas
  • Use Jupyter notebooks for ad hoc calculations, plots, and what-if?

Course Outline

The Python Environment

  • About Python
  • Starting Python
  • Using the interpreter
  • Running a Python script
  • Python scripts on Unix/Windows
  • Using the Spyder editor

Getting Started

  • Using variables
  • Built-in functions
  • Strings
  • Numbers
  • Converting among types
  • Writing to the screen
  • String formatting
  • Command line parameters

Flow Control

  • About flow control
  • White space
  • Conditional expressions (if,else)
  • Relational and Boolean operators
  • While loops
  • Alternate loop exits

Array Types

  • About sequences
  • Lists
  • Tuples
  • Indexing and slicing
  • Iterating through a sequence
  • Using enumerate()
  • Functions for all sequences
  • Keywords and operators for all sequences
  • The range() function
  • Nested sequences
  • List comprehensions
  • Generator expressions

Working with files

  • File overview
  • Opening a text file
  • Reading a text file
  • Writing to a text file
  • Raw (binary) data

Dictionaries and Sets

  • Creating dictionaries
  • Iterating through a dictionary
  • Creating sets
  • Working with sets

Functions, Modules, and Packages

  • Four types of function parameters
  • Four levels of name scoping
  • Single/multi dispatch
  • Relative imports
  • Using __init__ effectively
  • Documentation best practices

Errors and Exception Handling

  • Syntax errors
  • Exceptions
  • Using try/catch/else/finally
  • Handling multiple exceptions
  • Ignoring exceptions

Using the Standard Library

  • The sys module
  • Launching external programs
  • Walking directory trees
  • Grabbing web pages
  • Sending e-mail
  • Paths, directories, and filenames
  • Dates and times
  • Zipped archives

Pythonic Programming

  • The Zen of Python
  • Common idioms
  • Named tuples
  • Useful types from collections
  • Sorting
  • Lambda functions
  • List comprehensions
  • Generator expressions
  • String formatting

Introduction to Python Classes

  • Defining classes
  • Constructors
  • Instance methods and data
  • Attributes
  • Inheritance
  • Multiple inheritance

Developer Tools

  • Program development
  • Comments
  • pylint
  • Customizing pylint
  • Using pyreverse
  • The unittest module
  • Fixtures
  • Skipping tests
  • Making a suite of tests
  • Automated test discovery
  • The Python debugger
  • Starting debug mode
  • Stepping through a program
  • Setting breakpoints
  • Profiling
  • Benchmarking

Excel Spreadsheets

  • The openpyxl module
  • Reading an existing spreadsheet
  • Creating a spreadsheet from scratch
  • Modifying an existing spreadsheet
  • Setting Styles

Serializing Data

  • Using ElementTree
  • Creating a new XML document
  • Parsing XML
  • Finding by tags and XPath
  • Parsing JSON into Python
  • Parsing Python into JSON
  • Working with CSV

iPython and Jupyter

  • iPython features
  • Using Jupyter notebooks
  • Benchmarking
  • External Commands
  • Cells
  • Sharing Notebooks

Introduction to NumPy

  • NumPy basics
  • Creating arrays
  • Shapes
  • Stacking
  • Indexing and slicing
  • Array creation shortcuts
  • Matrices
  • Data Types

Brief intro to SciPy

  • What is SciPy?
  • The Python science ecosystem
  • How to use SciPy
  • Getting Help
  • SciPy subpackages

Intro to Pandas

  • Pandas overview & architecture
  • Series
  • Dataframes
  • Reading and writing data
  • Data alignment and reshaping
  • Basic indexing
  • Broadcasting
  • Removing Entries
  • Timeseries
  • Reading Data

Introduction to Matplotlib

  • Overal architecture
  • Plot terminology
  • Kinds of plots
  • Creating plots
  • Exporting plots
  • Using Matplotlib in Jupyter
  • What else can you do?

Who Benefits

This course is geared for data analysts, developers, engineers, or anyone tasked with utilizing Python for data analytics tasks.

Our core Python and data science training courses provide students with a solid foundation for continued learning based on role, goals, or their areas of specialty.

Prerequisites

While there are no specific programming prerequisites, students should be comfortable working with files and folders and the command line. Prior scripting experience is helpful but not required.