Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.036 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.01; 'subject:error': 0.03; 'argument': 0.05; 'skip:o 50': 0.09; 'skip:n 90': 0.16; 'skip:s 130': 0.16; '<': 0.19; 'import': 0.22; 'print': 0.22; 'values': 0.27; 'message-id:@mail.gmail.com': 0.30; 'keys': 0.31; 'skip:b 30': 0.33; 'skip:d 20': 0.34; 'received:google.com': 0.35; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'skip:y 20': 0.60; 'zip': 0.64; '10:': 0.84; 'sheet': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=6Z2BkDDt2qK8jJLqOc7n28AFxUw58WzF3t9jd0DfYOQ=; b=I+4IVy9P0L1VcqPk7ky2603CvewpLaSAGlJiol6ot6jELWqZm4NmTu3/1KKQDJfQXq 5nIzIPmPzTyPLG4cur6mfZ4q8ofkDLVFWSw5Ao2R7IrYIgpVchd9Q/FCuj5gP6ufu1ZX 7qZlYRMI4hVqOPSuRD5aKAza/pCfhu9i681OMEQH4SlhVN5+SVeCsQw1OFTA9A8AYyGe fzNCs4WJiJNzvuteZnBC0rJ/gKOM7e1nOjN+c+A2+sNj22HWmYMrFQaMunDUuCn9nMf5 Iqt+FjX25M3c81+NzHPu6xZo3m6Eodpy4iG8M8Vo9jlOM6sD29QKkhh7lv121OD4feUg GdrQ== MIME-Version: 1.0 X-Received: by 10.180.8.102 with SMTP id q6mr27788609wia.72.1416908098051; Tue, 25 Nov 2014 01:34:58 -0800 (PST) Date: Tue, 25 Nov 2014 15:04:58 +0530 Subject: Dictionary error From: Thuruv V To: python-list@python.org Content-Type: multipart/alternative; boundary=f46d04440280dd24c90508ab9f74 X-Mailman-Approved-At: Tue, 25 Nov 2014 12:17:14 +0100 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 286 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1416914234 news.xs4all.nl 2943 [2001:888:2000:d::a6]:56560 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:81497 --f46d04440280dd24c90508ab9f74 Content-Type: text/plain; charset=UTF-8 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 --f46d04440280dd24c90508ab9f74 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Please Clarify the 'TypeError: zip argument #1 must suppor=
t iteration'

import openpyxl

book =
=3D op=
enpyxl=
.load_=
workbook'c:/users/c_thv/desktop/tax.xlsx')
sheet =
=3D bo=
ok.get_sheet=
_by_name'Thilip')
cell =
=3D sh=
eet.cell(row=3D2<=
/span>,column =3D<=
span class=3D"" style=3D"margin:0px;padding:0px;border:0px;font-size:13.696=
0000991821px;vertical-align:baseline;background:transparent"> =
4)
i =3D<=
/span> 2=3D<=
/span> []
y =3D<=
/span> []
while i < 10:
   keys  =
sheet.=
cell(=
row=3Di,column =3D 4)
   values =3D sheet.cell=
(row =
=3D i,column =3D 5)
   x.<=
/span>append<=
/span>(keys<=
span class=3D"" style=3D"margin:0px;padding:0px;border:0px;font-size:13.696=
0000991821px;vertical-align:baseline;background:transparent">.value)
   y.<=
/span>append<=
/span>(values.value)
   i +=
=3D1
   mydict =3D dict(zip(keys,values)
print mydict
--f46d04440280dd24c90508ab9f74--