''' Hannen Wolfe CS 151: Fall 2026 Test process_file function in data_transforms Please place this file in the same folder as data_transforms.py and example.csv ''' import data_transforms as dt def test_code(): headers, data = dt.process_file("example.csv") print("TEST 1: There are the correct number of headers: ",len(headers) == 3) print("TEST 2: There are the correct number of rows: ",len(data) == 50) float_test = all(isinstance(item, float) for row in data for item in row) twoD_array = not data or all(len(sub) == len(data[0]) for sub in data) print("TEST 3: All data rows have the same number of columns: ", twoD_array) print("TEST 4: There are the correct number of data columns: ", len(headers) == len(data[0])) print("TEST 5: All data has been converted to a float: ", float_test) x , y, z = dt.normalizeColumns(data) print("Minimum", y) print("Maximum", z) print("First Row", x[0]) print("Last Row", x[-1]) if __name__ == "__main__": test_code()