here’s an error which i am struggling with:
TypeError Traceback (most recent call last)
Cell In[39], line 1
----> 1 TIME, SERIES = parse_data_from_file(DATA_PATH)
Cell In[38], line 14, in parse_data_from_file(filename)
3 “”“Parse data from csv file
4
5 Args:
(…)
9 (np.ndarray, np.ndarray): arrays of timestamps and values of the time series
10 “””
11 ### START CODE HERE
12 # Load the temperatures using np.loadtxt. Remember you want to skip the first
13 # row, since it’s headers. Make sure to use the correct column of the csv file.
—> 14 next(filename)
15 temperatures = np.loadtxt(float(filename[2]))
16 times = np.loadtxt(int(filename[0])) # Create the time steps.
TypeError: ‘str’ object is not an iterator