using DataFrame.style loses all default table styling
See original GitHub issueBug report for Colab: http://colab.research.google.com/.
For questions about colab usage, please use stackoverflow.
- Describe the current behavior:
Using the DataFrame.style in anyway completely removes all default table styling for dataframes.
See also this stackoverflow question
- Describe the expected behavior:
Using dataframe.style.apply
and/or dataframe.style.applymap
should add to the existing style, not remove all existing style. This is the default behavior in Jupyter.
-
The web browser you are using (Chrome, Firefox, Safari, etc.): Chrome
-
Link (not screenshot!) to a minimal, public, self-contained notebook that reproduces this issue (click the Share button, then Get Shareable Link): https://colab.research.google.com/drive/1iKoBlatiVWDV8qlYVwawh4W5apfv8DX-?usp=sharing
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Pandas Styles removing default table format - Stack Overflow
Basically, all I want is to get the "Thousand" separator on my values. I managed to do it using the pd.style.format function. It...
Read more >Table Visualization — pandas 1.5.2 documentation - PyData |
The Styler creates an HTML <table> and leverages CSS styling language to manipulate many parameters including colors, fonts, borders, background, etc. See here ......
Read more >Style Pandas Dataframe Like a Master - Towards Data Science
The basic idea behind styling is to leverage visual aids like color and format, in order to communicate insight more efficiently.
Read more >Style Python Pandas DataFrames! (Conditional Formatting ...
Learn how to add style to your Pandas DataFrames, including formatting cells, conditional formatting in color, and applying bars to cells.
Read more >Rendering tables with pandoc.table
Users are advised to stick with the default multiline style, ... simple tables are have more compact syntax that all other styles, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Colab only applies the ‘dataframe’ styling to HTML table elements with the
dataframe
classname. The regular dataframe adds the dataframe class but the styler one does not.The best approach is probably to explicitly add the
dataframe
class:This may possibly be addressed as part of https://github.com/pandas-dev/pandas/issues/41693?
Indeed, this is now fixed, and we forgot to close this issue. 😃