Working with directories
To process bigger amounts of data, you will need to work on more than one file. Sometimes you don't know all the files in advance.
Fill in the gaps
Explain the following code:
import os for dirname in os.listdir('.'): print(dirname)
Write a program that counts the number of files in the unzipped set of baby names. Have the program print that number.
Verify that the number is correct.
How many entries (lines) does the entire name dataset have?
Hint: Generate a message that tells you which file the program is reading.
Write a program that finds the most frequently occuring name in each year and prints it.
Find and print your name and the according number in each of the files, so that you can see how the number changes over time.