Skip to content

pytables selection enhancements (to close GH #1966) #2261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

jreback
Copy link
Contributor

@jreback jreback commented Nov 15, 2012

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 PyTables enhancements for selection #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)

  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 pandas-dev#1996
@jreback
Copy link
Contributor Author

jreback commented Nov 15, 2012

see #2264

@jreback jreback closed this Nov 15, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant