title: Data storage to ease data interpolation in Python
body: <p>I have 20+ tables similar to table 1. Where all letters represent actual values.</p>
  
  <pre><code>Table 1:
  $ / cars |&lt;1 | 2 | 3 | 4+
  &lt;10,000  | a | b | c | d
  20,000   | e | f | g | h
  30,000   | i | j | k | l
  40,000+  | m | n | o | p
  </code></pre>
  
  <p>A user input could be for example, (2.4, 24594) which is a value between f, g, j, and k.
  My Python function definition and pseudo-code to calculate this bilinear interpolation is as follows.</p>
  
  <pre><code>def bilinear_interpolation( x_in, y_in, x_high, x_low, y_low, y_high ):
     # interpolate with respect to x
     # interpolate with respect to y
     # return result
  </code></pre>
  
  <p>How should I store the data from table 1 (a file, a dict, tuple of tuples, or dict of lists), so I can perform the bilinear interpolation most efficiently and correctly? </p>