title: How do I import a 3D table in csv in python?
body: <p>I have to import a 3-dimensional table of data in order to manipulate it in my Python script.</p>
  <p>The 3 dimensions I have are:</p>
  <ol>
  <li>Coverage</li>
  <li>Age</li>
  <li>Premium</li>
  </ol>
  <p>The coverage rows and age column are not fixed, meaning there could me more or less than the sample below.</p>
  <p>My current test data looks (FWD_FIXED_5YRS.csv) like this;</p>
  <pre><code>COVERAGE    Age 18  Age 20  Age 25  Age 30  Age 35  Age 40  Age 45  Age 50  Age 55  Age 60
  50000.00    53.00   53.00   53.00   53.00   55.50   67.50   82.50   129.00  175.50  288.50
  100000.00   54.00   54.00   54.00   60.00   74.00   117.00  146.00  198.00  331.00  536.00
  150000.00   78.50   78.50   81.00   90.00   111.00  169.50  219.00  307.50  496.50  804.00
  200000.00   108.00  108.00  108.00  120.00  148.00  222.00  292.00  410.00  662.00  1027.00
  250000.00   87.50   87.50   90.00   102.50  124.00  165.00  235.00  350.00  557.50  1215.00
  300000.00   105.00  105.00  108.00  123.00  147.00  198.00  282.00  420.00  669.00  1458.00
  ....
  ....
  </code></pre>
  <p>I've tried something from another qn but I seem to be only getting the first few columns:</p>
  <pre><code>import csv
  
  with open('FWD_FIXED_5YRS.csv', 'r') as f:
      obj = csv.reader(f)
      X, Y, Z = [], [], []
      for i,row in enumerate(obj):
          if i&gt;0:
               xstring = row[0]
               ystring = row[1]
               zstring= row[2]
               print (xstring, ystring, zstring)
  </code></pre>