-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
ENH: omit CSSStyle rules for hidden table elements (#43619) #43673
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
Conversation
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.
looks good but comments
You don't have to, but might also like to try and solve the same issue for the index or column headers, that might get CSS for ids if |
- use fixture - test only styles - use "applymap" instead of "background_gradient"
I also implemented it for column and index headers. |
do we have an asv for this? can you show the perf change (and add asv if we don't have). |
|
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.
lgtm. i will take a look at the asvs, but even if the performance improvement is marginal it makes better HTML anyway.
sure, just covering bases |
@rendner you can use the code in #43687 to see the rendering performance enhancement. I expect minimal, but the performance in HTML might be better for large dataframes. To execute it see the contributing to pandas page running the performance test suite: https://pandas.pydata.org/docs/development/contributing_codebase.html
|
@attack68 Thank you.
The command gave me the following error Here are the results:
I guess the performance for hidden cells could be further improved by moving the data_element_visible check at the start of the for loop. And if not visible continue with the next cell. But I'm unsure how much we would gain. |
This is good, don't need anything else. Im surprised it gets this much improvement but the asv does specifically hide almost all elements. @jreback happy to merge? |
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.
lgtm
thanks @rendner |
I couldn't run all tests, because of the following problem, which isn't related to my changes: