Skip to content

Commit eb7fe68

Browse files
committed
minor requests
1 parent efc7fca commit eb7fe68

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

doc/source/whatsnew/v1.3.0.rst

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ Other enhancements
5454
- Add support for dict-like names in :class:`MultiIndex.set_names` and :class:`MultiIndex.rename` (:issue:`20421`)
5555
- :func:`pandas.read_excel` can now auto detect .xlsb files (:issue:`35416`)
5656
- :meth:`.Rolling.sum`, :meth:`.Expanding.sum`, :meth:`.Rolling.mean`, :meth:`.Expanding.mean`, :meth:`.Rolling.median`, :meth:`.Expanding.median`, :meth:`.Rolling.max`, :meth:`.Expanding.max`, :meth:`.Rolling.min`, and :meth:`.Expanding.min` now support ``Numba`` execution with the ``engine`` keyword (:issue:`38895`)
57+
- :meth:`.Styler.set_tooltips` allows on hover tooltips to be added to styled HTML dataframes.
5758

5859
.. ---------------------------------------------------------------------------
5960

pandas/io/formats/style.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ def clear(self) -> None:
805805
Returns None.
806806
"""
807807
self.ctx.clear()
808-
self.tooltips = None
808+
self.tooltips: Optional[_Tooltips] = None
809809
self.cell_context = {}
810810
self._todo = []
811811

@@ -1934,6 +1934,7 @@ def _translate(self, styler_data: FrameOrSeriesUnion, uuid: str, d: Dict):
19341934
]
19351935

19361936
if self.table_styles:
1937+
# add span class to every cell only if at least 1 non-empty tooltip
19371938
for row in d["body"]:
19381939
for item in row:
19391940
if item["type"] == "td":

0 commit comments

Comments
 (0)