Skip to main content
Ctrl+K
Practical Data Science with Python - Home Practical Data Science with Python - Home
  • Practical Data Science in Python

Duke IDS Classes

  • PDS I (IDS 540)
  • PDS II (IDS 541)
  • PDS (MIDS) (IDS 720)

Setting Up Your Environment

  • Setting Up Python and conda
  • Validate Python Install
  • Setting Up VS Code
  • Augmenting Your Command Line
  • Jupyter Notebooks
  • VS Code, R, and Jupyter

Command Line

  • Command Line Basics
  • Advanced Command Line
  • Git and Github

Numpy

  • Vectors
    • Working with Vectors
    • Doing Math With Vectors
    • Type Promotion in numpy
    • The Python Ease of Use / Speed Tradeoff
    • Vectorization in Python
    • Vector Recap
  • Subsetting Vectors
    • Modifying Subsets of Vectors
    • Recap
  • Views and Copies
    • When Do I Get a View and When Do I Get a Copy?
    • Variables are pointers to objects
    • Review of Views and Copies
  • Matrices
    • Intro to Matrices
    • Folding and Reshaping Matrices
    • Matrices as Images
    • Subsetting Matrices
    • Editing Subsets
    • Review of Matrices
  • Arrays
    • Broadcasting
    • Review of ND-Arrays
    • Summarizing Arrays
    • Practical Example: comparing weather by counting like-values
    • Color Images as Arrays
  • Random numbers

Pandas

  • Welcome to Pandas
    • Pandas Series
    • Subsetting and Indexing Series
    • (OPTIONAL) Subsetting and Indexing with Single Square Brackets ([])
    • The object Data Type
    • Working with tabular data through Dataframes
    • Subsetting DataFrame Tricks and Gotchas
    • The Categorical Data Type
    • PyArrow: An Alternative to Numpy as Pandas Backend
  • Indexes
  • Views and Copies in Pandas
    • Views and Copies in pandas
    • The View/Copy Headache in pandas without Copy on Write
  • Reading Data
    • Binary Data
  • Data Cleaning
    • Fixing Data Value Problems
    • Editing Specific Locations
    • Cleaning Data Types
    • Missing Data
  • Data Manipulations
    • Concatenating
    • Merging
    • Combining datasets: merging
    • Practical Example
    • Validating Merges
    • Grouping
    • Grouping in multiple dimensions with pivot_tables
    • Reshaping Data
    • Querying

Data Visualization

  • Matplotlib Fundamentals
    • Plotting with matplotlib
    • A figure in 10 pieces
    • Implicit vs explicit syntax
    • Saving to file
    • Plotting Zoo: multiple ways to visualize the same set of data
    • Plotting with Pandas
  • Different Types of Plots
    • Plotting text (and a side note on axis scaling)
    • Stack Plots
    • Pie charts
    • Subplots
    • Subplots: a deeper dive
    • Exercise: Creating a subplot of timeseries (solution)
    • Exercise: Creating a subplot of timeseries
    • Doing more with scatter plots
    • Visualizing ranges and uncertainty
    • Heat maps
    • Exercise: Analyzing Poker Hand Outcomes
    • Exercise: Analyzing Poker Hand Outcomes
    • Histograms
    • Two Dimensional Histograms
  • Advanced Matplotlib
    • Customizing styles
    • Plotting Zoo - with style!
    • Making Plots Pretty Part 1: laying the foundation
    • Making pretty plots in Python: customizing plots in matplotlib
  • Seaborn Objects and GoG
    • Seaborn Object Recipes
    • From Seaborn to Matplotlib

Big Data & Performance

  • What is Big Data?
  • Big Data Strategies
  • Parquet
  • Object dtypes
  • Solving Performance Issues
  • Parallel Computing
  • Distributed Computing with dask

Geospatial Analysis

  • What is GIS?
  • Installing Geopandas
  • GIS with Geopandas
  • Mapping with Geopandas
  • Merging Spatial Data Sets
  • Spatial Projections
  • Managing Projections in Geopandas
  • Spatial Data

Practical Skills and Concepts

  • Debugging
    • Debugging Python in VS Code
  • Defensive Programming
    • Testing in a Data Analysis Workflow
    • Readability
    • Don’t Duplicate Information
    • Collaboration
    • The Iceberg Principle
  • Workflow Management
  • Getting Help Online
  • Python: Variables vs. Objects
    • Python vs. R: Important Differences To Be Aware Of
  • Backwards Design
  • Numbers in Computers
  • Writing Good Jupyter Notebooks
  • Reviewing Code on Github
  • conda Environments

Statistical Modelling

  • Inference vs. Prediction Data Science
  • Linear Regression in Python
  • Categorical Variables, Indicator Variables and Linear Regression
  • Pulling Back the Curtain: Pandas to Numpy with patsy
  • OPTIONAL: Beyond The Basic Model

Professional Advice

  • Duke Data Science Electives
  • So You’re Thinking About a PhD
  • Getting Involved in Research
  • Public Interest DS Jobs
  • How To Buy A Computer
  • chatGPT and You
  • Ergonomics and Adaptive Tech

Miscellaneous

  • Running Python in the VS Code Interactive Window
  • Understanding and Managing Python Packages
  • Combining numbers and text into strings: f-strings
  • Repository
  • Open issue

Index

By Kyle Bradbury & Nick Eubank

© Copyright 2026.