I am trying to do some data manipulation and analysis using python. I am new to python and I am having some troubles loading data using the csv library of functions. My code:
import csv
out = open("data1.csv","rb")
data = csv.reader(out)
data = [row for row in data]
x = data[:,0]
Produces the error:
Traceback (most recent call last):
File "/home/matthew/NumericalAnalysis.py", line 12, in <module>
x = data[:,0]
TypeError: list indices must be integers, not tuple
From what I understand this could be in part due to the fact that the list was saved as strings instead of floats. If so can someone help me with this?