CMPINF_2100_Fall_2021

Repository for weekly in-lecture programming examples.

Week 01

  • Course introduction and software download
  • Creating your own virtual environment
  • Intro to commond line, Spyder IDE, and Jupyter notebooks
  • Basic commands, data types, and variable assignment
  • Intro to iteration with for-loops

Week 02

  • Generating random numbers with the random module
  • Iteration with for-loops and list comprehensions
  • Writing and applying user defined functions
  • Simulation to show the Centrl Limit Theorem
  • Simulation to estimate the standard error on the mean with random and lists

Week 03

  • Class, attributes, methods, and modify-in-place
  • Side effects
  • Exceptions and debugging within Jupyter notebooks
  • Intro to NumPy arrays: creation, attributes, methods, concatenate, reshape
  • Random number generation with NumPy
  • Simulation to estimate the standard error on the mean with NumPy

Week 04

  • Introduction to Pandas Series and DataFrames
  • Object creation, basic attributes, and methods
  • Selecting columns and rows (filtering)
  • Introduction to exploring data with Pandas
  • Introduction to joining (merging) DataFrames

Week 05

  • Subsetting rows based on strings using .str.contains()
  • Unique values and number of unique values
  • Basic plotting with Pandas - bar charts, boxplots, and scatter plots
  • .apply() method
  • Introduction to missing values
  • SPLIT-APPLY-COMBINE with .groupby() and .aggregate() to summarize data