-
Notifications
You must be signed in to change notification settings - Fork 75
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
Support mask=
argument in LocBody
#566
Merged
Merged
Changes from 5 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
cad69b4
A rough idea for supporting the `mask` argument in `GT.tab_style()`
jrycw c8d62f0
Ensure the `mask=` argument is used exclusively without specifying `c…
jrycw 7dc6544
Add tests for `resolve_mask_i()`
jrycw 4123eb0
Update test name
jrycw 616bbf3
Replace ambiguous variable name `masks` with `cellpos_data`
jrycw db2133f
Update the `resolve_mask_i()` logic based on team feedback
jrycw 9484e1e
Replace `assert` with `raise ValueError()`
jrycw eb62e34
Update test cases for `GT.tab_style()`
jrycw e2d150d
Add additional test cases for `resolve_mask_i()`
jrycw 993baff
Add docstring for `mask=` in `LocBody`
jrycw 34d7452
Use `df.height` to get the number of rows in a DataFrame
jrycw 4cbce52
Rename `resolve_mask_i` to `resolve_mask`
jrycw be7c141
Apply code review suggestions for the `mask=` implementation in `LocB…
jrycw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
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.
What if the rules for the mask were as follows?:
frame.select(mask_expr)
--return a DataFrame that:enumerate(mask_result.iter_rows())
).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.
Thanks for summarizing the rules.
It seems that for the last part, we only need a single loop to gather all the information required by
CellPos
.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.
How about this version?
For prototyping, use
assert
for validation, which can later be replaced withraise ValueError()
.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've replaced
assert
withraise ValueError()
and added more test cases.