pydata/pandas — pull request #2261 by jreback (2012-11-15 19:09:12+00:00)
Title: pytables selection enhancements (to close GH #1966)

in pandas/io/pytables.py

1. added __str__ (to do __repr__)
2. row removal in tables is much faster if rows are consecutive
3. added Term class, refactored Selection (this is backdwards compatible)
Term is a concise way of specifying conditions for queries, e.g.

Term(dict(field = 'index', op = '>', value = '20121114'))
Term('index', '20121114')
Term('index', '>', '20121114')
Term('index', ['20121114','20121114'])
Term('index', datetime(2012,11,14))
Term('index>20121114')

updated tests for same

this should close GH #1996

also potentially a starting point to do things like this:
df['df>0']...e.g allowing simple string expressions in criteria (Term is indpendent; I could move to a separete module.... - just a thought)