A Dimarts 16 Maig 2006 16:43, Ivan Vilata i Balaguer va escriure:
> En/na Gyan Sinha ha escrit::
> > [...]
> > from tables import *
> >
> > f = openFile('abs.h5')
> > abs = f.root.performance
> >
> > boams = [ x for x in abs if abs.cols.shelf == ' BOAMS'
> > and abs.cols.sar > 0]
> >
> > f.close
> > [...]
>
> Using table.cols.some_column for conditions is only supported in
> Table.where() (and then, conditions spanning multiple columns are only
> supported in the forthcoming PyTables Pro). This alternative syntax
> (which uses a Row iterator) should work for you::
>
> boams = [ row for row in abs if row['shelf'] == ' BOAMS'
> and row['sar'] > 0 ]
Ooops! Ivan is very right and I rather absent-minded ;-)
Francesc
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users