Closed
Description
The pandas options seem to be little haphazard in the way they have been accumulated and implemented in pandas.
This issue is a master tracker for considering pandas.options
relevant to styler
and also in relation to deprecation of DataFrame.to_html
and DataFrame.to_latex
(#41649 #41693)
The complete list of existing pandas.options
is below with their description and view on what to port to styler
. The summary is below:
Pending Options:
-
styler.sparse.index
: ENH: addstyler
option context for sparsification of columns and index separately #41512 -
styler.sparse.columns
: ENH: addstyler
option context for sparsification of columns and index separately #41512 -
styler.render.max_elements
: dynamic render trimming for v large dataframes ENH: set render limits onStyler
to automatically trim dataframes #41635 -
styler.render.max_rows
: ENH:max_rows
max_cols
kw forStyler.to_html
+styler.options
#42972 -
styler.render.max_columns
: ENH:max_rows
max_cols
kw forStyler.to_html
+styler.options
#42972 -
styler.render.encoding
: doctype format ("utf-8") ENH:styler.render.encoding
option #43177 -
styler.render.repr
: notebook default ("html") ENH:styler.render.repr
option #43180 -
styler.format.precision
ENH:styler.format
options #43256 -
styler.format.thousands
ENH:styler.format
options #43256 -
styler.format.escape
ENH:styler.format
options #43256 -
styler.format.formatter
ENH:styler.format
options #43256 -
styler.format.na_rep
ENH:styler.format
options #43256 -
styler.format.decimal
ENH:styler.format
options #43256 -
styler.html.mathjax
ENH:styler.html.mathjax
option #43283 (if not legacy would have not included) -
styler.latex.multirow_align
ENH:styler.latex
options #43284 (if not legacy would have not included) -
styler.latex.multicolumn_align
ENH:styler.latex
options #43284 (if not legacy would have not included) -
styler.latex.longtable
ENH:styler.latex
options #43284 -
styler.latex.hrules
ENH: latex styler bool pandas options #43670 -
too esoteric, not worthy of global namespace.styler.latex.siunitx
-
too esoteric, not worthy of global namespace.styler.latex.css_convert
Status
- Exclude: the option is not relevant for styler and will not be added.
- Exclude Pending: the option is currently considered not relevant for styler pending a discussion or future development.
- Pending: the option is scheduled for development.
- Implemented: the option already exists in
styler
options.
Option | Default | Function | Decision | Discussion |
---|---|---|---|---|
display.chop_threshold | None | If set to a float value, all float values smaller then the given threshold will be displayed as exactly 0 by repr and friends. | Exclude | Rarely used, doesn't warrant styler option addition. Can, alternatively, be specifically coded by a UDF formatter option. |
display.colheader_justify | right | Controls the justification of column headers. used by DataFrameFormatter. | Exclude Pending | Should be coded with CSS, very specific option to add in? |
display.column_space | 12 | No description available. | Exclude | not relevant, console use only. |
display.date_dayfirst | False | When True, prints and parses dates with the day first, eg 20/01/2005 | Exclude Pending | May have possible use. Future dev? |
display.date_yearfirst | False | When True, prints and parses dates with the year first, eg 2005/01/20 | Exclude Pending | .. |
display.encoding | UTF-8 | Defaults to the detected encoding of the console. Specifies the encoding to be used for strings returned by to_string, these are generally strings meant to be displayed on the console. | Pending | Styler should have its own option |
display.expand_frame_repr | True | Whether to print out the full DataFrame repr for wide DataFrames across multiple lines, max_columns is still respected, but the output will wrap-around across multiple “pages” if its width exceeds display.width. | Exclude | Relevant for console printing not HTML / LaTeX. |
display.float_format | None | The callable should accept a floating point number and return a string with the desired format of the number. This is used in some places like SeriesFormatter. See core.format.EngFormatter for an example. | Pending | Should be wrapped up into styler.format options. |
display.large_repr | truncate | For DataFrames exceeding max_rows/max_cols, the repr (and HTML repr) can show a truncated table (the default), or switch to the view from df.info() (the behaviour in earlier versions of pandas). allowable settings, [‘truncate’, ‘info’] | Exclude Pending | Can decide if this is completely necessary for HTML. |
display.latex.repr | False | Whether to produce a latex DataFrame representation for Jupyter frontends that support it. | Pending | Should be implemented into styler options. |
display.latex.escape | True | Escapes special characters in DataFrames, when using the to_latex method. | Pending | included in styler.format options. |
display.latex.longtable | False | Specifies if the to_latex method of a DataFrame uses the longtable format. | Pending | included in styler.latex options |
display.latex.multicolumn | True | Combines columns when using a MultiIndex | Pending | included in styler.latex options |
display.latex.multicolumn_format | ‘l’ | Alignment of multicolumn labels | Pending | included in styler.latex options |
display.latex.multirow | False | Combines rows when using a MultiIndex. Centered instead of top-aligned, separated by clines. | Pending | included in styler.latex options. |
display.max_columns | 0 or 20 | max_rows and max_columns are used in repr() methods to decide if to_string() or info() is used to render an object to a string. In case Python/IPython is running in a terminal this is set to 0 by default and pandas will correctly auto-detect the width of the terminal and switch to a smaller format in case all columns would not fit vertically. The IPython notebook, IPython qtconsole, or IDLE do not run in a terminal and hence it is not possible to do correct auto-detection, in which case the default is set to 20. ‘None’ value means unlimited. | Pending | styler has own maxs |
display.max_colwidth | 50 | The maximum width in characters of a column in the repr of a pandas data structure. When the column overflows, a “…” placeholder is embedded in the output. ‘None’ value means unlimited. | Excluded Pending | styler has no cell overflow currently |
display.max_rows | 60 | This sets the maximum number of rows pandas should output when printing out various output. For example, this value determines whether the repr() for a dataframe prints out fully or just a truncated or summary repr. ‘None’ value means unlimited. | Pending | styler render options |
display.min_rows | 10 | The numbers of rows to show in a truncated repr (when max_rows is exceeded). Ignored when max_rows is set to None or 0. When set to None, follows the value of max_rows. | Excluded | no need for min rows with HTML LaTex |
display.multi_sparse | True | “Sparsify” MultiIndex display (don’t display repeated elements in outer levels within groups) | ||
display.notebook_repr_html | True | When True, IPython notebook will use html representation for pandas objects (if it is available). | Pending | styler options |
display.precision | 6 | Floating point output precision in terms of number of places after the decimal, for regular formatting as well as scientific notation. Similar to numpy’s precision print option | Pending | styler.format options |
display.show_dimensions | truncate | Whether to print out dimensions at the end of DataFrame repr. If ‘truncate’ is specified, only print out the dimensions if the frame is truncated (e.g. not display all rows and/or columns) | Exclude Pending | maybe necessary for backwards compatability with display trimming. |
display.width | 80 | Width of the display in characters. In case Python/IPython is running in a terminal this can be set to None and pandas will correctly auto-detect the width. Note that the IPython notebook, IPython qtconsole, or IDLE do not run in a terminal and hence it is not possible to correctly detect the width. | Excluded | by note not relevant for HTML / LaTeX |
display.html.table_schema | False | Whether to publish a Table Schema representation for frontends that support it. | Excluded | not relevant for HTML/LaTeX |
display.html.border | 1 | A border=value attribute is inserted in the table tag for the DataFrame HTML repr. |
Excluded | this is deprecated HTML. |
display.html.use_mathjax | True | When True, Jupyter notebook will process table contents using MathJax, rendering mathematical expressions enclosed by the dollar symbol. | Pending | styler render option. |