I have a numpy structured array e.g. B which has the following form
array([('J0006+1834', '-99', 0.693748, 2.1e-15),
('J0007+7303', 'NRAD', 0.315873, 3.6e-13),
('B0011+47', '-99', 1.240699, 5.64e-16), ...,
('B2334+61', '-99', 0.49537, 1.93e-13),
('J2346-0609', '-99', 1.181463, 1.36e-15),
('B2351+61', '-99', 0.944784, 1.63e-14)],
dtype=[('Name', 'S10'), ('Type', 'S10'), ('P0', '<f8'), ('P1', '<f8')])
I need to be able to search for partial matches of the second column named Type. My array contains values in the secong columns that start with NR and I would like to be able to search for them as a group. I tried np.where and startwidth but I was not successfull. I also tried with wildcards but nothing worked.
Ideally I would like a command like this
B[B['Type']=='NR*']
which would return alla the elements of the array which in th column Type start with NR.
Thank you for your time and I am looking forward for your replies.