Hi Faheem,

On Thu, Jan 15, 2009 at 11:05 AM, Faheem Mitha <[email protected]> wrote:
>
>
> Hi,
>
> The following code returns a list of tuples to python from the db,
> corresponding to the values of the 'snpval_id' column in the table 'cell'.
> I was wondering if there was an easy way to have it return a list of
> values (in this case, integers) instead.
> result = conn.execute("select snpval_id from cell where patient_chipid IN 
> ('Duke00001_plateC_F11.CEL')").fetchall()
> *********************************************************************************

Easiest thing is probably just to use a list comprehension:
result_ints = [row[0] for row in result]

Cheers,
MZ

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to