title: best data-structure that i can use to store tabular data?
body: <p>I have a list of frames >10,000 and a list of sources (Coordinates), I want find which source exists on which frame. Each frame has a filter attribute, and it is expected that source can be found on one or more frames of the same filter. Is this is the case, i want to record only one one occurance of such an event. </p>
  
  <p>Eventually run a script easily to generate a web-table. Below is an example of tables i want to generate.</p>
  
  <pre><code>Source | filter_1 |filter_2 |filter_3 |filter_4 |
  -------------------------------------------------
  1      | image1   | image 2 | image 3 | image 4 |
  2      | image5   | image 6 | image 7 | image 8 |
  </code></pre>
  
  <p>this it my code</p>
  
  <pre><code>webtable =[]
  for frame in frames:
    for x, y in sources:
      if x_y_on_frame():
         webtable.append(
         {
         'source':(x,y), 
         'ifilter':frame.filter.name, 
         'ifile':frame.filename,
         'pFile':frame.pngfile,
         'fFile':frame.fitsfile,
         }
         )
  </code></pre>
  
  <p>I need to check if a combination of a source i.e. <code>(x,y)</code> and <code>ifilter</code> already exist in <code>webtable</code> before i append the record. What is the best data structure to implement this?</p>