[Numpy-discussion] how to build a series of arrays as I go?
Mon Mar 17 10:46:24 CDT 2008
I'm using xlrd to read an excel workbook containing several columns of
data as follows:
for r in range(1,sheet.nrows):
date = \
if date_cut_off and date < date_cut_off:
for c in range(len(names)):
name = names[c]
cell = sheet.cell(r,c)
value = -1
value = \
value = cell.value
How can I build arrays as I go instead of lists?
(ie: the last line of the above snippet)
Once I've built arrays, how can I mask the empty cells?
(the above shows my hack-so-far of turning empty cells into -1 so I can
use masked_where, but it would be greato build a masked array as I went,
for efficiencies sake)
cheers for any help!
PS: Slightly pissed off at actually paying for the book only to be told
it'll be 2 days before I can even read the online version, especially
given the woefully inadequate state of the currently available free
Simplistix - Content Management, Zope & Python Consulting
More information about the Numpy-discussion