[Numpy-discussion] Database with Nulls to Numpy Structure
Fri Oct 2 14:16:44 CDT 2009
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...
380 New York St.
Redlands, CA 92373
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion