I have a csv file with list of samples of various parameters of accelerometer and gyroscopic data. It contains floats(IQR,Range,MAD,...) and arrays(ZCD values). When I read it back, they are returned as strings and for my processing,I need numbers (int/float). I tried
results = map(int, results)
and
results = [int(i) for i in results]
I got them from here, but I am having a problem with the arrays.
Traceback (most recent call last):
File "/home/pi/Desktop/imu/mpu_v16.py", line 458, in <module>
main()
File "/home/pi/Desktop/imu/mpu_v16.py", line 439, in main
compare()
File "/home/pi/Desktop/imu/mpu_v16.py", line 305, in compare
nrow = [float(i) for i in nrow]
ValueError: could not convert string to float: [ 53 73 79 139]
How can I solve this?
I am adding a sample of my data:
C,3.3440452548950501e-17,0.99999999999999645,0.89244290726827058,1.7947499048650259,3.3651560716219242,[108 123 149 220 235],0.99999999999999822,110223.99999999971,331.99999999999915,-5.9524005537131887e-17,0.99999999999999989,0.81051947660768831,1.4756039753111405,4.4268119259334213,[103 122 160 205 212],0.99999999999999989,110224.00000000001,332.00000000000006,-6.4540073419474463e-17,0.999999999999999,0.74198651253618131,0.63512619216067612,4.256170326687128,[106 164 192 226],0.99999999999999933,110224.00000000001,332.00000000000006,2.083131190971185e-16,1.0000000000000009,0.66659374901400581,0.52759419283475883,4.5104130995285256,[ 7 14 45 56 150 327],1.0000000000000002,110223.99999999994,331.99999999999983,-3.0890618042093025e-17,0.99999999999999667,0.58289607514346964,0.21669963911591134,4.7919240951669444,[ 82 149 208],0.99999999999999822,110223.99999999942,331.99999999999824,-3.2771643497971487e-16,1.0000000000000009,0.58746356061392535,0.29681486739557372,5.2741718744905794,[ 26 48 59 66 114 171 231 242],1.0000000000000002,110224.00000000036,332.00000000000108,-0.57536274345915739,0.147595080030029,0.13018399571123057