Lesson Design

Last updated on 2024-09-03 | Edit this page

Pacing and overall schedule


  • Pacing: The modularity of the lesson allows instructors to select the amount of content appropriate to the needs of the learners.
  • Each module has 15 minutes of stretch content which may be optionally included.
  • There is an additional 30 minutes built into the startup time to accomodate delays.

Possible paths through the lesson

Slow morning OR afternoon

  • Startup + standard library
  • Startup + pandas

Average speed morning OR afternoon

  • Startup + standard library + pandas
  • Startup + standard library + standard library stretch
  • Startup + pandas + pandas stretch

Full day option

  • Startup + standard library + standard library stretch + lunch + pandas + pandas stretch

Modules and suggested timing


Startup (30 min)

  • 9:00 Late buffer
  • 9:15 Welcome
    • Code of conduct
    • Room logistics
    • Install/setup
  • 9:30 What is Python
    • About Python and its uses in libraries
    • Overview of the lesson

Standard library (2 hours 30 min)

  • 9:45: Understanding the environment and basic Python types and methods (15 min)
    • Familiarization with the IDE
    • Starting/stopping the IDE run or app
    • Print statements & evaluation
    • Strings
    • Variables
  • 10:00: Introduction to scripts (15 min)
    • Examine an example script
    • Tracing the control flow
    • Using help commands to look up functions
    • Anticipate output and test
    • Modify output and test
  • 10:15: csv module (15 min)
    • Using the csv module to open a file
    • Two-dimensional list data representation
    • if statements, for filtering
  • 10:30: Coffee (15 min)
  • 10:45: Working with data from the csv (15 min)
    • Accumulator patterns, for collecting strings from the data
    • Filtering rows and creating lists from the data
  • 11:00 (stretch content) (15 min)
    • Accumulating lists of data for csv output
    • Transforming a script to run on multiple files using glob

Pandas (1 hour)

  • 11:15 Introduction to pandas and Jupyter (15 min)
    • Importing pandas
    • How pandas is often used
    • Using Jupyter notebooks
    • Jupyter gotchas and good practices
  • 11:30 Reading a csv into a DataFrame (15 min)
    • read_csv and formatting options
    • Viewing a DataFrame
    • Evaluation vs. print() in Jupyter
    • Modifying data using pandas
  • 11:45 Working with DataFrames (15 min)
    • Column data types
    • NaNs and essential cleaning checks
    • Filtering data into a new DataFrame
    • Saving data as a new CSV file
  • 12:00 (stretch content) (15 min)
    • Aggregation and summaries
    • Quick plots of a DataFrame
    • Transformations of a DataFrame, such as transposing

Wrap-Up and Feedback (15 min)