Description
Feature Type
-
Adding new functionality to pandas
-
Changing existing functionality in pandas
-
Removing existing functionality in pandas
Problem Description
Currently pandas.io.formats.style.Styler.set_tooltips
works by adding a <span>
tags around <td>
elements. The <span>
is hidden by default and upon hover of the corresponding cell in the rendered table, the contents is replaced by that of the <span>
.
The issue is, if the contents of the <span>
is too large it is not all shown because it goes outside of the <td>
element.
Feature Description
I propose adding an option to pandas.io.formats.style.Styler.set_tooltips
to instead add the tooltip as a title
attribute of <td title=''>
. To my understanding the use of title
attribute is the canonical way to add tooltips to <td>
elements.
Alternative Solutions
Don't use pandas.io.formats.style.Styler.set_tooltips
and instead manually manipulate the rendered html after the fact with beautifulsoup4
.
Additional Context
No response