-
Notifications
You must be signed in to change notification settings - Fork 1.4k
8201 Fix DataFrame subsets indexing in CSVDataset() #8351
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
Merged
KumoLiu
merged 9 commits into
Project-MONAI:dev
from
bartosz-grabowski:8201-fix-csvdataset-dfs-indexing
Mar 20, 2025
Merged
8201 Fix DataFrame subsets indexing in CSVDataset() #8351
KumoLiu
merged 9 commits into
Project-MONAI:dev
from
bartosz-grabowski:8201-fix-csvdataset-dfs-indexing
Mar 20, 2025
Conversation
This file contains hidden or 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
Resolves: Project-MONAI#8201 Signed-off-by: Bartosz Grabowski <58475557+bartosz-grabowski@users.noreply.github.com>
Signed-off-by: Bartosz Grabowski <58475557+bartosz-grabowski@users.noreply.github.com>
Also updated the unittest to pass after the fix and not before. Signed-off-by: Bartosz Grabowski <58475557+bartosz-grabowski@users.noreply.github.com>
Contributor
Author
|
/black |
Signed-off-by: Bartosz Grabowski <58475557+bartosz-grabowski@users.noreply.github.com>
Contributor
Author
ericspod
approved these changes
Mar 3, 2025
Member
ericspod
left a comment
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.
I think this is good to go, we're waiting on a large PR to be merged, then we'll update this one and move forward.
Contributor
|
/build |
1 similar comment
Contributor
|
/build |
KumoLiu
reviewed
Mar 19, 2025
…ow_indices != None By changing .loc to .iloc, the previous fix didn't work for row_indices != None and df subsets, because it assumed positional index instead of label index. Signed-off-by: Bartosz Grabowski <58475557+bartosz-grabowski@users.noreply.github.com>
…et() Signed-off-by: Bartosz Grabowski <58475557+bartosz-grabowski@users.noreply.github.com>
Contributor
|
/build |
KumoLiu
approved these changes
Mar 20, 2025
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.
Fixes #8201 .
Description
convert_tables_to_dictswas using.locto index DataFrames which was changed to.iloc. It was causing unexpected behavior inCSVDatasetas demonstrated in #8201 because.locexpects labels, but was instead provided positions of the rows.Unittest was added which fails before the change and passes afterwards.
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests --disttests.make htmlcommand in thedocs/folder.