-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Tweak data frame HTML repr #18100
Comments
Assuming this is acceptable (it seems good to me), then I think it's just updating this polars/py-polars/polars/dataframe/_html.py Line 106 in 7f3c636
to
|
Will this also get rid of the bold formatting? |
No, I didn't really notice it. I also don't see where the bolding comes in, maybe because it's part of thead. |
It's probably some predefined style of the header row. Would this be a change that everyone would like to see? |
I would prefer either italics or a 10-pt Consolas (or other fixed-width font) in grey (not black) to slightly subdue it. Using fixed-width helps indicate it's an official label. |
I said 10-pt assuming everything else was 12pt, since Consolas renders larger characters; what about a fixed width with a 8- or 9-pt font? From the screenshots above I too prefer the italic, but not by a lot: the slanted italics breaks up the flow of the columns a bit, and I think the smaller grey font may look best. |
Also just adding more nitpickiness here. Is it possible to reduce the row height of the dtype row as well somewhat, maybe by 25%? |
Another nit: the |
I can add more mockups, let me know what you would like to see. Note that I'm not generating them with the original HTML rendering, so they might not look 100% like the real thing. Re alignment, the entire |
Description
Data frames are printed as a nice HTML table when working in Jupyter notebook:
This currently results in the following output:
I find the styling of the column types a bit distracting though, they look exactly like column headers. Therefore, I suggest to print column types in italic, which would look like this:
The text was updated successfully, but these errors were encountered: