-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: exclude html table border w/False value #45943
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
Merged
Changes from 17 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
baf5c52
ENH: exclude html table border w/falsy value
z3c0 e375c1d
ENH: exclude html table border w/falsy value
z3c0 5223ee2
Fixes from pre-commit [automated commit]
z3c0 48be71d
BUG: allow border="0", exclude border only on False
z3c0 8a5098e
Merge branch 'main' into borderless-html-tables
z3c0 70a4cba
DOC: revise to_html enchancements to reflect border=0 fix
z3c0 1d3ce9a
Merge branch 'borderless-html-tables' of https://github.com/z3c0/pand…
z3c0 0a830bd
Merge branch 'main' into borderless-html-tables
z3c0 f134fd5
Merge branch 'main' into borderless-html-tables
z3c0 16845e9
move enhancement note to I/O section
z3c0 4b65fbc
Merge branch 'main' into pr/45943
z3c0 aa01d8f
Merge branch 'main' into borderless-html-tables
z3c0 2cd3015
remove trailing whitespace
z3c0 ef16850
Merge branch 'main' into borderless-html-tables
z3c0 fc67d7d
Merge branch 'main' into borderless-html-tables
z3c0 d9462e6
Merge branch 'main' into pr/45943
z3c0 51168df
remove redundant line from merge resolution
z3c0 ea38d32
adjust test cases to allow not testing instance
z3c0 231982b
remove true check of border
z3c0 16b9dbc
check for border=True
z3c0 46e03ba
adjust tests to account for border=0 hiding border attr
z3c0 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 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
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
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
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
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
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.
why is this instance check needed?
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.
Not my first choice, but it's to pass this test case:
pandas/pandas/tests/io/formats/test_to_html.py
Line 345 in 03ecf60
Setting
border=0
has to result inborder="0"
being present in the output HTML. The instance check is to ensure that only a boolean can be used to hide the border.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.
why is
border=0
not de-facto the same asborder=False
?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.
In my opinion, it should be. That's how I originally wrote the fix. My only reason for taking this approach is to conform to the test case, which explicitly tests for a border attribute to be present upon
border=0
.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 ok to treat these cases as the same and can simplify the code a bit
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.
Sounds good to me - I will revert to my original fix, and update that test case instead