I'm looking for the PyTables counterpart of a SQL query in the form of...
SELECT col2 FROM table WHERE col1 IN (val1, val2, val3...)
...where the condition values are stored in a Python list/tuple or numpy array of arbitrary length. The search values are determined during runtime of the application by the user.
I've tried an approach using PyTables Conditions related with in-kernel search:
options = {
'val' : 'someval1'
'val' : 'someval2'
}
for row in table.where('col1 == val', options):
print row['col2']
but it's only picking the first value.
My main goal is to build the options dictionary or list dynamically and pass it to Pytables.