I am very new to python and I only need it so I analyse some data for bio.
Please help on How I can fix the error below,
could not convert string to float
I am trying to plot (Time, Distance)
Here is some sample data:
Nematode No. 1 1 2 2
No. of jumps Time (sec) Distance (mm) Time Distance
1 0.195781141 0.893988392 1.25388 0.56569
2 2.386623538 1.073359412 3.5848484 1.55656
3 2.915538343 1.227371636 4.284848 2.34454545
4 4.993603286 0.653631116 6.4545454 3.65445
5 8.002735854 0.986036142 2.35554 0.2548545
6 10.84267517 0.939671599 4.245454 0.5484848
My code (yet)
from mmap import mmap,ACCESS_READ
from xlrd import open_workbook
from pylab import *
from xlrd import open_workbook,XL_CELL_TEXT
import csv
from scipy import stats
values = csv.reader(open('simple.csv', 'rb'), delimiter=',',skipinitialspace=True)
for column in values:
print column[1],column[2]
Time = column[1]
Distance = column[2]
plot(Time,Distance)
show()
column[0]is the first column, notcolumn[1].