Hi, my friends,
I try to use csv module to input data in csv format but split does not work. Could you please help? The input data is 2 column data separated in comma as csv format.
The code is following:
reader = csv.reader(open('Indices.csv', 'r'), delimiter = ',')
line = 0
IndexHeader = reader.next()
line = line+1
for line in reader:
TradingDate, MarketIndex = line.split(',')
The error is after running these code:
AttributeError: 'list' object has no attribute 'split'
The data is very simple like:
Thanks so much in advance.