title: Reference a table column by its column header in Python
body: <p>Is there a Pythonic way to refer to columns of 2D lists by name? </p>
  
  <p>I import a lot of tables from the web so I made a general purpose function that creates 2 dimensional lists out of various HTML tables. So far so good. But the next step is often to parse the table row by row. </p>
  
  <pre><code># Sample table. 
  # In real life I would do something like: table = HTML_table('url', 'table id')
  table = 
  [
      ['Column A', 'Column B', 'Column C'],
      ['One', 'Two', 3],
      ['Four', 'Five', 6]
  ]
  
  # Current code:
  iA = table[0].index('Column A')
  iB = tabel[0].index('Column B')
  for row in table[1:]:
      process_row(row[iA], row[iC])
  
  # Desired code:
  for row in table[1:]:
      process_row(row['Column A'], row['Column C'])
  </code></pre>