Reverse Instructional Design --- Processing data files in the IPython Notebook

Jul 31, 2014 • Brian Forst

Q1
You are using the data_processing.ipynb notebook to work with your data (with the file structure below). How would you get a list of the files in the Class directory?

directory_structure

a)
os.listdir('../Class')

b)
import os<br /> os.listdir('../Class')

c)
import os<br /> os.listdir('/Class')

d)
os.listdir('./Class/')

e)
import os<br /> os.listdir('Class')

 

Q2
Using glob and pandas, for each CSV file in the ‘Class’ directory, print out the filename, and the average and median of the ‘Score’ column.