2 Day – Numeric Python for Scientists

A 2-day introduction to using Python in a scientific environment which covers handling data files, numeric analysis, line plots, histograms, contour plots and Pandas data frames. The focus is on understanding the capabilities and restrictions of the relevant Python modules and using best practices when working with numeric data files and efficient handling of large data sets.

Prerequisites

This course is designed for scientists or developers who have practical programming experience using Python with and understanding of tuples, lists, dictionaries, list comprehension, classes, exception handling, file I/O and module structure.

Learning Objectives

The course will help scientists develop Python programs for numeric data analysis and plotting, specifically:

  • Manipulating numeric data using numpy
  • Reading numeric data from files
  • Working with incomplete data and numpy masked arrays
  • Managing time series data
  • Using matplotlib to plot line charts, bar charts and contour plots
  • Working with Pandas data frames

Delivery

This course comprises a mix of theory, demonstrations and hands on exercises. Approximately 50% of the time is hands-on. This course can be delivered using python 2.7 or Python 3.

Day 1 – Numeric Python

  • Defining numpy vectors and arrays
  • Matrixes and n-dimensional data
  • Resizing and reshaping arrays
  • Array operations and functions
  • Aggregate methods
  • Reading and writing array data
  • Reading csv and fixed fields text data
  • Formatted output
  • Index arrays
  • Comparisons and Boolean arrays
  • Masked arrays
  • Reading NetCDF data files
  • Working with time series data

Day 2 – Plotting and Pandas

  • Plotting line charts with matplotlib
  • Configuring axes, labels and scales
  • Text labels and annotations
  • Plotting time series
  • Bar charts and histograms
  • Contour and image plots
  • Data interpolation and curve fitting
  • Working with pandas
  • Pandas object types
  • Manipulating data frames
  • Plotting Pandas data
  • Reading and saving data
  • Handling Excel data