I\'m looking to read in an Excel workbook with 15 fields and about 2000 rows, and convert each row to a dictionary in Python. I then want to append each dictionary to a list
from xlrd import open_workbook
dict_list = []
book = open_workbook('forum.xlsx')
sheet = book.sheet_by_index(3)
# read first row for keys
keys = sheet.row_values(0)
# read the rest rows for values
values = [sheet.row_values(i) for i in range(1, sheet.nrows)]
for value in values:
dict_list.append(dict(zip(keys, value)))
print dict_list