Analyzing Data from Multiple Files - Lesson 6

Questions

  • How can I do the same operations on many different files?

Objectives

  • Use a library function to get a list of filenames that match a wildcard pattern.
  • Write a for loop to process multiple files.

Lecture



Alternate video link.


Jupyter Notebook File

Please use the Jupyter notebook named "06AnalyzingDataFromMultipleFiles.ipynb" for this lesson. If you haven't downloaded them already, you may find them here.

Key Points

  • Use glob.glob(pattern) to create a list of files whose names match a pattern.
  • Use * in a pattern to match zero or more characters, and ? to match any single character.