Vince Fulco (el 2007-11-05 a les 13:33:09 -0500) va dir::

> A bit off track from the core app but I wondered if anyone might have
> a suggestion for the best way to store (and access) a set of
> conditions to be used against an automated table query process.
>[...]
> Condition #1, temperature > 10 degrees & temperature < 20 degrees
> Condition #2, temperature > 20 degrees & temperature < 30 degrees & Tuesday
> 
> The individual conditions might have a number of criteria from 1 to 6 
> typically.
> 
> I would like to run each line as a separate query against my data and
> then calculate summary statistics.  Any trailheads would be much
> appreciated.

Any container which may store strings of text would be sufficient.
Since you'll probably spend more time running a query than getting its
definition, the simplest solutions wouldn't hurt overall performance
(but of course, you should run some timings).

For instance, with a text file::

    for query in open('query_file'):
        do something with table.where(query) or table.readWhere(query)

As simple as that.  BTW, please note that the '&' operator takes a
different precedence than 'and', so you'd better use::

    (temperature > 10) & (temperature < 30)

Hope that helps,

::

        Ivan Vilata i Balaguer   >qo<   http://www.carabos.com/
               Cárabos Coop. V.  V  V   Enjoy Data
                                  ""

Attachment: signature.asc
Description: Digital signature

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to