I have a .csv file like this
vehicle,speed,datetime,x,y
61C22276,0.0,1.4926212E9,106.33695,11.12652
60C28912,0.0,1.4926212E9,106.84327166666667,10.90424
51D06538,0.0,1.4926212E9,106.7806,10.765768333333334
50LD08650,0.0,1.4926212E9,106.91705,10.746173333333333
50LD08519,41.0,1.4926212E9,106.95493,10.739623333333334
50LD07182,0.0,1.4926212E9,106.917225,10.746073333333333
I imported this data into numpy by
my_data = genfromtxt('data/2017-04-20.csv',names=True,delimiter=',')
The output is:
[(b'61C22276', 0., 1.49262120e+09, 106.33695 , 11.12652 )
(b'60C28912', 0., 1.49262120e+09, 106.84327167, 10.90424 )
(b'51D06538', 0., 1.49262120e+09, 106.7806 , 10.76576833) ...,
(b'61C18919', 0., 1.49265726e+09, 106.77865833, 11.03690667)
(b'61C18919', 0., 1.49265729e+09, 106.77865833, 11.03690667)
(b'61C18919', 0., 1.49265732e+09, 106.77865833, 11.036905 )]
which is an array of tuples (because my data consists of multiple types)
How do I slice my_data based on a value of a column? (Ex: List all the rows of the vehicle 61C2226)