title: From ndarray to iterable lists/variables
body: <p>I have the following array which is a list of samples, probes, values for the probe, a boolean to describe if its a control (not all controls will contain the word "control") and a molecular weight for the probe. The array is the result of importing using pandas and merging a template and sample import list. The example array:</p>
  
  <pre><code>array([('Sample1', 'Control1',  846,  True, 130),
         ('Sample1', 'Control2',  527,  True, 202),
         ('Sample1', 'Control3',  493,  True, 274),
         ('Sample1', 'Control4',  426,  True, 418),
         ('Sample1', 'Control4',  191,  True, 490),
         ('Sample1', 'Probe1', 1647, False, 138),
         ('Sample1', 'Probe2', 1146, False, 170),
         ('Sample1', 'Probe3',  958, False, 210),
         ('Sample1', 'Probe4',  814, False, 242),
         ('Sample1', 'Probe5',  301, False, 282),
         ('Sample2', 'Control1', 1355,  True, 130),
         ('Sample2', 'Control2',  785,  True, 202),
         ('Sample2', 'Control3',  936,  True, 274),
         ('Sample2', 'Control4',  748,  True, 418),
         ('Sample2', 'Control4',  335,  True, 490),
         ('Sample2', 'Probe1', 2532, False, 138),
         ('Sample2', 'Probe2', 1679, False, 170),
         ('Sample2', 'Probe3', 1488, False, 210),
         ('Sample2', 'Probe4', 1387, False, 242),
         ('Sample2', 'Probe5',  500, False, 282),
         ('Sample3', 'Control1', 1701,  True, 130),
         ('Sample3', 'Control2',  936,  True, 202),
         ('Sample3', 'Control3', 1048,  True, 274),
         ('Sample3', 'Control4',  705,  True, 418),
         ('Sample3', 'Control4',  308,  True, 490),
         ('Sample3', 'Probe1', 2957, False, 138),
         ('Sample3', 'Probe2', 1994, False, 170),
         ('Sample3', 'Probe3', 1663, False, 210),
         ('Sample3', 'Probe4', 1300, False, 242),
         ('Sample3', 'Probe5',  545, False, 282)],
        dtype=[('FILENAME', 'O'), ('Probe', 'O'), ('Value', '&lt;i8'), ('QC', '?'), ('MW', '&lt;i8')])
  </code></pre>
  
  <p>Everything is together at the moment. Whenever I try to iterate through the array according to the probe or the boolean I get results that include all of the samples.</p>
  
  <p>I would like to produce seperated iterable lists saved in a variable for each sample so for example: I can take sample 1, work out the sum of the probe values for those that are marked as true, store it in a variable and do something with that number later. What would be the best way to do this?</p>
  
  <p>Thank you in advance</p>
  
  <p><strong>Adding some more information:</strong></p>
  
  <p>Ideally I want to be able to take any sample, and for each probe in that sample be able to return a value for that sample alone. </p>
  
  <p>I want to be able to take the probes value and divide it by the sum of the True probes to create a ratio for each probe of each sample. </p>