[SciPy-user] SQLite columns to scipy arrays

Bill Dandreta wjdandreta@att....
Fri Aug 17 09:51:42 CDT 2007


What is the fastest/best way to put the columns of an SQLite database
into scipy arrays?

I've been doing it with the following pseudo-code but it is kind of slow
for large blocks of data.

col1=[]
col2=[]
...
for r in cursor:
    col1.append(r['col1'])
    col2.append(r['col2'])
    ...
acol1=S.array(col1)
acol2=S.array(col2)
...

-- 
Bill

wjdandreta@att.net

Gentoo Linux X86_64 2.6.20-gentoo-r8

Reclaim Your Inbox with http://www.mozilla.org/products/thunderbird/

All things cometh to he who waiteth as long as he who waiteth worketh like hell while he waiteth.




More information about the SciPy-user mailing list