Styler.highlight_null()

Styler.highlight_null(null_color='red') [source] Shade the background null_color for missing values. New in version 0.17.1. Parameters: null_color: str Returns: self : Styler

Styler.highlight_min()

Styler.highlight_min(subset=None, color='yellow', axis=0) [source] Highlight the minimum by shading the background New in version 0.17.1. Parameters: subset: IndexSlice, default None a valid slice for data to limit the style application to color: str, default ?yellow? axis: int, str, or None; default None 0 or ?index? for columnwise, 1 or ?columns? for rowwise or None for tablewise (the default) Returns: self : Styler

Styler.highlight_max()

Styler.highlight_max(subset=None, color='yellow', axis=0) [source] Highlight the maximum by shading the background New in version 0.17.1. Parameters: subset: IndexSlice, default None a valid slice for data to limit the style application to color: str, default ?yellow? axis: int, str, or None; default None 0 or ?index? for columnwise, 1 or ?columns? for rowwise or None for tablewise (the default) Returns: self : Styler

Styler.format()

Styler.format(formatter, subset=None) [source] Format the text display value of cells. New in version 0.18.0. Parameters: formatter: str, callable, or dict subset: IndexSlice An argument to DataFrame.loc that restricts which elements formatter is applied to. Returns: self : Styler Notes formatter is either an a or a dict {column name: a} where a is one of str: this will be wrapped in: a.format(x) callable: called with the value of an individual cell The default display value for nu

Styler.clear()

Styler.clear() [source] ?Reset? the styler, removing any previously applied styles. Returns None.

Styler.bar()

Styler.bar(subset=None, axis=0, color='#d65f5f', width=100) [source] Color the background color proptional to the values in each column. Excludes non-numeric data by default. New in version 0.17.1. Parameters: subset: IndexSlice, default None a valid slice for data to limit the style application to axis: int color: str width: float A number between 0 or 100. The largest value will cover width percent of the cell?s width Returns: self : Styler

Styler.export()

Styler.export() [source] Export the styles to applied to the current Styler. Can be applied to a second style with Styler.use. New in version 0.17.1. Returns: styles: list See also Styler.use

Styler.applymap()

Styler.applymap(func, subset=None, **kwargs) [source] Apply a function elementwise, updating the HTML representation with the result. New in version 0.17.1. Parameters: func : function func should take a scalar and return a scalar subset : IndexSlice a valid indexer to limit data to before applying the function. Consider using a pandas.IndexSlice kwargs : dict pass along to func Returns: self : Styler

Styler.background_gradient()

Styler.background_gradient(cmap='PuBu', low=0, high=0, axis=0, subset=None) [source] Color the background in a gradient according to the data in each column (optionally row). Requires matplotlib. New in version 0.17.1. Parameters: cmap: str or colormap matplotlib colormap low, high: float compress the range by these values. axis: int or str 1 or ?columns? for colunwise, 0 or ?index? for rowwise subset: IndexSlice a valid slice for data to limit the style application to Returns:

Style

New in version 0.17.1 Provisional: This is a new feature and still under development. We'll be adding features and possibly making breaking changes in future releases. We'd love to hear your feedback. This document is written as a Jupyter Notebook, and can be viewed or downloaded here. You can apply conditional formatting, the visual styling of a DataFrame depending on the data within, by using the DataFrame.style property. This is a property that returns a pandas.Styler object, which ha