childmindresearch / bids2table

Efficiently index large-scale BIDS neuroimaging datasets and derivatives
https://childmindresearch.github.io/bids2table/
MIT License
13 stars 5 forks source link

Flatten columns, column renaming #16

Closed clane9 closed 1 year ago

clane9 commented 1 year ago

The multi-index columns have been clumsy for some folks. Now return a dataframe with flat columns and a string prefix indicating the column group.

It is still possible to convert to a hierarchical index, select a particular group, or drop the group level in post-processing. This usage is shown in the example.

Other changes:

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 90.47% and project coverage change: +1.19% :tada:

Comparison is base (886d184) 90.70% compared to head (c97e550) 91.89%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #16 +/- ## ========================================== + Coverage 90.70% 91.89% +1.19% ========================================== Files 10 10 Lines 441 432 -9 ========================================== - Hits 400 397 -3 + Misses 41 35 -6 ``` | [Files Changed](https://app.codecov.io/gh/cmi-dair/bids2table/pull/16?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cmi-dair) | Coverage Δ | | |---|---|---| | [bids2table/helpers.py](https://app.codecov.io/gh/cmi-dair/bids2table/pull/16?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cmi-dair#diff-YmlkczJ0YWJsZS9oZWxwZXJzLnB5) | `90.62% <ø> (+11.67%)` | :arrow_up: | | [bids2table/extractors/\_inheritance.py](https://app.codecov.io/gh/cmi-dair/bids2table/pull/16?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cmi-dair#diff-YmlkczJ0YWJsZS9leHRyYWN0b3JzL19pbmhlcml0YW5jZS5weQ==) | `91.17% <75.00%> (+2.94%)` | :arrow_up: | | [bids2table/\_\_init\_\_.py](https://app.codecov.io/gh/cmi-dair/bids2table/pull/16?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cmi-dair#diff-YmlkczJ0YWJsZS9fX2luaXRfXy5weQ==) | `100.00% <100.00%> (ø)` | | | [bids2table/\_bids2table.py](https://app.codecov.io/gh/cmi-dair/bids2table/pull/16?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cmi-dair#diff-YmlkczJ0YWJsZS9fYmlkczJ0YWJsZS5weQ==) | `89.47% <100.00%> (-0.53%)` | :arrow_down: | | [bids2table/extractors/bids.py](https://app.codecov.io/gh/cmi-dair/bids2table/pull/16?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cmi-dair#diff-YmlkczJ0YWJsZS9leHRyYWN0b3JzL2JpZHMucHk=) | `89.65% <100.00%> (ø)` | | | [bids2table/extractors/dataset.py](https://app.codecov.io/gh/cmi-dair/bids2table/pull/16?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cmi-dair#diff-YmlkczJ0YWJsZS9leHRyYWN0b3JzL2RhdGFzZXQucHk=) | `89.58% <100.00%> (ø)` | | | [bids2table/extractors/metadata.py](https://app.codecov.io/gh/cmi-dair/bids2table/pull/16?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cmi-dair#diff-YmlkczJ0YWJsZS9leHRyYWN0b3JzL21ldGFkYXRhLnB5) | `91.17% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.