DATA170
Exploring Data

Activity 3

File I/O

  1. Write the function column_mean(csv_file, header_name) that returns the mean of all of the values in a column of a CSV file. The parameter csv_file is a string that is the file name of the CSV file the function to read from. The parameter header_name is a string that is the header text of the column in the CSV file to compute the mean of. The function should not use Pandas or the csv module.