I have a csv file with two columns. I am trying to read that second column from that csv file to a list in python . I referred to some of the ways in stackoverflow. I tried them, but I am getting an error.
noise_amp=[] #an empty list to store the second column
with open('null_ch1_waveform_10mV.csv', 'rb') as rf:
reader = csv.reader(rf, delimiter=';')
for row in reader:
noise_amp.extend([row[1]])
I am getting this error:
Traceback (most recent call last):
File "J:/Ramu_Scripts/noise_script/source_code.py", line 58, in <module>
noise_amp.extend([row[1]])
IndexError: list index out of range
My csv file is like
1,2
2,3
3,4
4,5