as.io.formats.style.Styler.set_uuid ](pandas.io.formats.style.Styler.set_uuid.html)
    * [ pandas.io.formats.style.Styler.clear ](pandas.io.formats.style.Styler.clear.html)
    * [ pandas.io.formats.style.Styler.pipe ](pandas.io.formats.style.Styler.pipe.html)
    * [ pandas.io.formats.style.Styler.highlight_null ](pandas.io.formats.style.Styler.highlight_null.html)
    * [ pandas.io.formats.style.Styler.highlight_max ](pandas.io.formats.style.Styler.highlight_max.html)
    * [ pandas.io.formats.style.Styler.highlight_min ](pandas.io.formats.style.Styler.highlight_min.html)
    * [ pandas.io.formats.style.Styler.highlight_between ](pandas.io.formats.style.Styler.highlight_between.html)
    * [ pandas.io.formats.style.Styler.highlight_quantile ](pandas.io.formats.style.Styler.highlight_quantile.html)
    * [ pandas.io.formats.style.Styler.background_gradient ](pandas.io.formats.style.Styler.background_gradient.html)
    * [ pandas.io.formats.style.Styler.text_gradient ](pandas.io.formats.style.Styler.text_gradient.html)
    * [ pandas.io.formats.style.Styler.bar ](pandas.io.formats.style.Styler.bar.html)
    * [ pandas.io.formats.style.Styler.to_html ](pandas.io.formats.style.Styler.to_html.html)
    * [ pandas.io.formats.style.Styler.to_latex ](pandas.io.formats.style.Styler.to_latex.html)
    * [ pandas.io.formats.style.Styler.to_excel ](pandas.io.formats.style.Styler.to_excel.html)
    * [ pandas.io.formats.style.Styler.to_string ](pandas.io.formats.style.Styler.to_string.html)
    * [ pandas.io.formats.style.Styler.export ](pandas.io.formats.style.Styler.export.html)
    * [ pandas.io.formats.style.Styler.use ](pandas.io.formats.style.Styler.use.html)
  * [ Plotting ](../plotting.html)
  * [ Options and settings ](../options.html)
  * [ Extensions ](../extensions.html)
  * [ Testing ](../testing.html)
  * [ Missing values ](../missing_value.html)

  * [ __ ](../../index.html)
  * [ API reference ](../index.html)
  * [ Style ](../style.html)
  * pandas.io.fo... 

#  pandas.io.formats.style.Styler.set_tooltips  #

Styler.  set_tooltips  (  _ ttips  _ , _ props  =  None  _ , _ css_class  =
None  _ )  [ [source]  ](https://github.com/pandas-
dev/pandas/blob/v2.2.2/pandas/io/formats/style.py#L413-L507) #

    

Set the DataFrame of strings on ` Styler  ` generating ` :hover  ` tooltips.

These string based tooltips are only applicable to ` <td> ` HTML elements, and
cannot be used for column or index headers.

New in version 1.3.0.

Parameters  :

    

**ttips** DataFrame

    

DataFrame containing strings that will be translated to tooltips, mapped by
identical column and index values that must exist on the underlying Styler
data. None, NaN values, and empty strings will be ignored and not affect the
rendered HTML.

**props** list-like or str, optional

    

List of (attr, value) tuples or a valid CSS string. If ` None  ` adopts the
internal default values described in notes.

**css_class** str, optional

    

Name of the tooltip class used in CSS, should conform to HTML standards. Only
useful if integrating tooltips with external CSS. If ` None  ` uses the
internal default value âpd-tâ.

Returns  :

    

Styler

    

Notes

Tooltips are created by adding  <span class=âpd-tâ></span> to each data
cell and then manipulating the table level CSS to attach pseudo hover and
pseudo after selectors to produce the required the results.

The default properties for the tooltip CSS class are:

  * visibility: hidden 

  * position: absolute 

  * z-index: 1 

  * background-color: black 

  * color: white 

  * transform: translate(-20px, -20px) 

The property âvisibility: hidden;â is a key prerequisite to the hover
functionality, and should always be included in any manual properties
specification, using the ` props  ` argument.

Tooltips are not designed to be efficient, and can add large amounts of
additional HTML for larger tables, since they also require that ` cell_ids  `
is forced to  True  .

Examples

Basic appli