_file.rea
d(self._col_size(i))), range(self._header['nvar']))
C:\Python26\lib\site-packages\StataTools.py in (i)
168 else:
169 data[i] = self._unpack(typlist[i],
self._file.read(s
elf._col_size(i)))
170 return data
171
I'm running a for loop which returns an error message after the third
iteration (see out[4] at the bottom as evidence). I don't understand the
error message. Although I'll continue to do my own digging to debug, I
thought I'd give you all a shot. Thanks, -steve
Python 2.6.2 (r262:71605, Apr 14
ch I call 'age'?
Thanks for your patience with this newbie.
Steve
On Sun, Jul 5, 2009 at 5:19 PM, Rich Lovely wrote:
> 2009/7/5 Steven Buck :
> >>>> for i in len(test): > testvar2.append(test[i][2])
> >
> > I want testvar2 = [2,5,8] b
;>> for i in len(test):
testvar2.append(test[i][2])
I want testvar2 = [2,5,8] but instead I get the following error message:
Traceback (most recent call last):
File "", line 1, in
for i in len(test):
TypeError: 'int' object is not iterable
Any insight would be ap
r, so let me know if I've used it
appropriately or if I should change/narrow the structure of my question.
Thanks
Steve
--
Steven Buck
Ph.D. Student
Department of Agricultural and Resource Economics
University of California, Berkeley
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor