excel - Graphing in python using numpy -


i'm new @ python i'm missing obvious

but want import data excel , graph it. in excel there 1 column each row having list of numbers separated commas. want extract second , third numbers each array use x , y.

i've converted excel file csv file.

fname = str("raw1.csv") # store in data directory data = np.loadtxt('../data/' + fname,                 delimiter=',',                 skiprows=6,                 usecols=(1,2,6,7,8,3,4,5))   x1 = data[:,[1]] print x1 y1 = data[:,[2]] print y1 

but when check i've extracted correct data, x1 shows third number , y1 defaults zero.

i'm not sure why happening?

here's example data csv file

"0, 57217.09, 51514.46, 58537.72, 44444.79, 0.00, 0.00, 0.00, 0.00, 0.016,  0.472, 0.170, 14:22:39.438" "1, 56912.86, 51240.30, 58259.08, 44179.38, 0.00, 0.00, 0.00, 0.00, 0.000,  0.000, 0.000, 14:22:39.919" "2, 58354.95, 52950.70, 59965.86, 45914.75, 0.00, 0.00, 0.00, 0.00, 0.000,  0.000, 0.000, 14:22:39.920" 

use np.shape() finding dimension of data, can see what's actual mistake making , extract data list according need.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -