Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #81497
| Date | 2014-11-25 15:04 +0530 |
|---|---|
| Subject | Dictionary error |
| From | Thuruv V <wasp52dex@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.16275.1416914234.18130.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
Please Clarify the 'TypeError: zip argument #1 must support iteration'
import openpyxl
book = openpyxl.load_workbook('c:/users/c_thv/desktop/tax.xlsx')
sheet = book.get_sheet_by_name('Thilip')
cell = sheet.cell(row=2,column = 4)
i = 2
x = []
y = []while i < 10:
keys = sheet.cell(row=i,column = 4)
values = sheet.cell(row = i,column = 5)
x.append(keys.value)
y.append(values.value)
i +=1
mydict = dict(zip(keys,values)print mydict
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Dictionary error Thuruv V <wasp52dex@gmail.com> - 2014-11-25 15:04 +0530 Re: Dictionary error Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-11-25 22:30 +1100 Re: Dictionary error John Gordon <gordon@panix.com> - 2014-11-25 16:36 +0000
csiph-web