-
Notifications
You must be signed in to change notification settings - Fork 5
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
Higher-level API #17
Merged
Merged
Higher-level API #17
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add `BIDSTable` subclass of `DataFrame` with convenience methods for accessing subtables and flattened metadata.
Add `BIDSTable.filter()` which filters rows according to a condition applied to a single column. The supported conditions follow `pandas.Series.filter()`.
Also change `file` column group to `finfo` to try to limit possible confusion.
Bug fixes: - Set the index of `flat_metadata` to the parent table's index. - Treat NA in the row mask as False in `filter()`.
PyBIDS supports querying a layout with multiple filters specified as keyword arguments. This is a nice interface, and is also useful for programmatic filtering. Here we add a `filter_multi()` method to do something similar.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #17 +/- ##
==========================================
+ Coverage 91.89% 93.03% +1.13%
==========================================
Files 10 10
Lines 432 560 +128
==========================================
+ Hits 397 521 +124
- Misses 35 39 +4
☔ View full report in Codecov by Sentry. |
Add a `func` arg option to `filter` for arbitrary lambda function filtering. Also move `join_bids_path()` into the `table` module.
Having the argument be `output` in `bids2table` was confusing when you only want to load a table.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a higher level
BIDSTable
interface inspired by the proposed PyBIDS API redesign.