I would like to store the metadata from a collection of PDF files in a CSV file. Here is the code of my first attempt at the problem: