I have just created and filled my first PyTables file. Trying to query the data, I ran into a problem. There is a column ic_name
which is of type StringCol(500)
and I have created an index for this column. The following code works fine:
count = 0
for x in f.root.raw.projects:
if x['ic_name']=="XXX":
count += 1
The value of count
is a bit more than 200.000 afterwards, which is the correct value. To speed up the query, I created the index and wanted to query like this:
f.root.raw.projects.where('ic_name == "XXX"')
Now I get back only 180 results!? Any hint what might be going on here?