[Numpy-discussion] Database with Nulls to Numpy Structure
Mark Janikas
mjanikas@esri....
Fri Oct 2 14:16:44 CDT 2009
Hello All,
I was hoping you could help me out with a simple little problem I am having:
I am reading data from a database that contains NULL values. There is more than one field being read in with equal length, but if any of them are NULL in a row, then I do NOT want to include it in my numpy structure (I.e. no records for that row across fields). As the values from each field are of the same type, I can pre-allocate the space for the entire dataset (if all were not NULL), but there may be less observations after accounting for the NULLS. So, do I use lists and append then create the arrays... Or do I fill up the pre-allocated "empty" arrays and slice off the ends? Thoughts? Thanks much...
MJ
Mark Janikas
Product Engineer
ESRI, Geoprocessing
380 New York St.
Redlands, CA 92373
909-793-2853 (2563)
mjanikas@esri.com<mailto:mjanikas@esri.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20091002/c919ab75/attachment-0001.html
More information about the NumPy-Discussion
mailing list