-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
Open
Labels
IO HTMLread_html, to_html, Styler.apply, Styler.applymapread_html, to_html, Styler.apply, Styler.applymapMaster TrackerHigh level tracker for similar issuesHigh level tracker for similar issuesRefactorInternal refactoring of codeInternal refactoring of codeStylerconditional formatting using DataFrame.styleconditional formatting using DataFrame.style
Description
The tracker of items needed to do before deprecating DataFrame.to_html().
Blockers
- Acceptance of the
jinja2requirement for HTML output, sinceStylerrequiresjinja2. - Acceptance of removal/hard break of specific kwargs and all formatting keyword args (see below).
Development
- make
Styler.to_htmlas performant or better thanDataFrame.to_html(PERF: halve render time in Styler with itertuples #39972) (PERF: make Styler default formatter arguments statics instead of repeated dynamic #40425) (ENH: makeStylercompatible with non-unique indexes #41269) - make Styler functional for all DataFrames (i.e. including non-unique columns, indexes) (ENH: make
Stylercompatible with non-unique indexes #41269). - enhance with ability to style indexes/column headers with styles (e.g bold rows) (ENH:
Styler.to_htmlgetsbold_headersandcaptionkwarg #43149) -
enhancenot necessary.hide_columnswith.show_columnsalternative (optional) - add the sparsify kwargs (ENH:
sparse_columnsandsparse_indexadded toStyler.to_html#41946). - add render trimming to prevent browser crash on large data (ENH: set render limits on
Stylerto automatically trim dataframes #41635) - decide whether to add or drop max_rows / max_cols / min_rows (ENH:
max_rowsmax_colskw forStyler.to_html+styler.options#42972) - enhance
.hide_columnsand.hide_indexto have dual function to hide the entire array, or specific items (API: makehide_columnsandhide_indexhave a consistent signature and function inStyler#41266 DEPR REF:hide(axis=..)replaceshide_indexandhide_columns#43771) - make styler reactive to separate sparse columns and index separately (ENH: add
styleroption context for sparsification of columns and index separately #41512) - add pandas options for
stylerfor default output manipulation, using_repr_html_methods (Opinion requested: Pandas Options for Styler #41395) - add the ability to render a a table_id even if exclude_styles is True (for back compat)
- add the ability to hide index names ENH: kw
namestoStyler.hide_index#43346 -
add the(using DataFrame.style loses all default table styling googlecolab/colabtools#1687)class="dataframe"attribute by default for google colab
Treatment of Keyword Args
| Old Keyword | New Keyword | Reason |
|---|---|---|
buf |
buf |
|
encoding |
encoding |
|
table_id |
table_uuid |
|
classes |
table_attributes |
extended utility |
sparsify |
sparse_indexsparse_columns |
more control of individual components |
max_rowsmin_rowsmax_cols |
max_rowsmax_columns |
min_rows removed since it is console related |
bold_rows |
bold_headers |
included to allows some back compatability |
| ... | doctype_html |
adds ability to form a full HTML document or just style and table HTML elements. |
| ... | exclude_styles |
adds ability to more closely replicate DataFrame.to_html by dropping extra features. |
| ... | caption |
adds ability to set a caption on Styler from the calling method. |
na_repformattersfloat_formatdecimalescape |
removed | replaced by Styler.format(...) which has more control |
columnsheaderindex |
removed | replaced by Styler.hide_index(...) and Styler.hide_columns(...) |
border |
removed | deprecated HTML should be controlled with CSS |
col_space |
removed | should be controlled with CSS, e.g. 'min-width: 100px;' |
render_links |
removed | not useful. only renders links identified as http[...], not as sub part of string, i.e. other http[...] text. if required should be added to Styler.format(...) |
notebook |
removed | This seems to only provide minor alignment changes that should be controlled with other CSS |
show_dimensions |
removed | This information is not needed in an HTML table of the DataFrame. df.shape provides the necessary workaround, and as a last resort caption=f"dimension: {df.shape}" displays the info. |
justify |
removed | since this is a styling arg which should be dealt with by other methods. |
index_names |
removed | assumed index names are removed from DataFrame if unwanted. As an alternative hide_columns could introduce a keyword argument to specifically hide the index names row. |
Metadata
Metadata
Assignees
Labels
IO HTMLread_html, to_html, Styler.apply, Styler.applymapread_html, to_html, Styler.apply, Styler.applymapMaster TrackerHigh level tracker for similar issuesHigh level tracker for similar issuesRefactorInternal refactoring of codeInternal refactoring of codeStylerconditional formatting using DataFrame.styleconditional formatting using DataFrame.style