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 ]
Good luck,
::
Ivan Vilata i Balaguer >qo< http://www.carabos.com/
Cárabos Coop. V. V V Enjoy Data
""
signature.asc
Description: OpenPGP digital signature
