-
Notifications
You must be signed in to change notification settings - Fork 272
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
Add condition option to read_table #1769
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea - pytables' in-kernel filters are very efficient as well, so this should speed up any pre-filtering.
do you know if the start/stop/step apply before or after the filtering? I was going to implement a chunked iterator wrapping read_table, so that may have an effect. |
Codecov Report
@@ Coverage Diff @@
## master #1769 +/- ##
==========================================
+ Coverage 92.03% 92.21% +0.18%
==========================================
Files 186 186
Lines 14605 15124 +519
==========================================
+ Hits 13441 13947 +506
- Misses 1164 1177 +13
Continue to review full report at Codecov.
|
It's before, the rows are first selected based on the slice(start, stop, step) and then filtered by condition:
|
This adds the possibility to use
tables
read_where
method using anumexpr
expression to only load rows fulfilling condition.Very handy for example to load data from only one telescope from a
by_type
table:condition="tel_id == 1"
or only load reconstructed events:condition = "hillas_length > 0"