dmep-python-intro icon indicating copy to clipboard operation
dmep-python-intro copied to clipboard

Intro to Python for Text and Data

Instructor: Allison Parrish

The goal of this course is to introduce students to essential techniques in working with text and data and to enhance their literacy in the language and practice of contemporary computer programming. Students will learn the Python programming language from scratch, and work toward making a small final project that meaningfully contributes to their interests and practice. Covered topics: working on the command line, Jupyter Notebook, data formats (CSV and JSON), Pandas, web scraping, text analysis with Natural Language Processing, Git and Github.

Schedule

Session 1

Session 2

  • Review the list of aspirational projects
  • Python: Expressions and strings
  • What is plain text?
  • Python: Writing Python programs
  • Suggested exercise: Write a Python program that mimics a UNIX command line tool. (Or otherwise creatively analyse or modify a text.)

Session 3

  • Jupyter Notebook tutorial
  • Lists and loops
  • Jupyter notebook from class
  • Suggested exercise: Exercise A. (Download this Python file and make the modifications suggested in the comments until the output matches the suggestions.)

Session 4

  • Dictionaries, sets and tuples
  • Jupyter notebook we created in class
  • Suggested exercise: Exercise B

Session 5

  • Counting things
  • Accessing Web APIs
  • Jupyter notebook from class
  • Suggested exercise: Web API Worksheet

Session 6

  • Scraping HTML with Beautiful Soup
  • Jupyter notebook from class
  • Suggested exercise: Web Scraping Worksheet

Session 7

  • Pandas for simple data analysis and visualization
  • Jupyter notebook from class
  • Suggested exercise: Pandas worksheet

Session 8

  • Pandas, continued
  • Jupyter notebook from class
  • Suggested exercise: Continue the Pandas worksheet

Session 9

Session 10

  • Project presentations