title: python creating dictionary from excel
body: <p>I have an excel sheet with 2 columns. Column 1 is name, and Column 2 is age. I want to create a dictionary where name is key and age is value. Here is the code, but it is creating a dictionary incorrectly.</p>
  
  <pre><code>keyValues = [x.value for x in worksheet.col(0)]
  data = dict((x, []) for x in keyValues)
  while curr_row &lt; num_rows:
          curr_row += 1
          for row_index in range(1, worksheet.nrows):  data[keyValues[row_index]].append(worksheet.cell_value(curr_row, 1))
  </code></pre>
  
  <p>I want to have a dictionary like below coming from 2 columns of excel sheet.</p>
  
  <pre><code>{'Ann': 12, 'Maria': 3, 'Robin': 4, 'NameN':N} 
  </code></pre>