1212 Callable ,
1313 Hashable ,
1414 Sequence ,
15+ overload ,
1516)
1617import warnings
1718
@@ -591,6 +592,52 @@ def to_excel(
591592 engine = engine ,
592593 )
593594
595+ @overload
596+ def to_latex (
597+ self ,
598+ buf : FilePath | WriteBuffer [str ],
599+ * ,
600+ column_format : str | None = ...,
601+ position : str | None = ...,
602+ position_float : str | None = ...,
603+ hrules : bool | None = ...,
604+ clines : str | None = ...,
605+ label : str | None = ...,
606+ caption : str | tuple | None = ...,
607+ sparse_index : bool | None = ...,
608+ sparse_columns : bool | None = ...,
609+ multirow_align : str | None = ...,
610+ multicol_align : str | None = ...,
611+ siunitx : bool = ...,
612+ environment : str | None = ...,
613+ encoding : str | None = ...,
614+ convert_css : bool = ...,
615+ ) -> None :
616+ ...
617+
618+ @overload
619+ def to_latex (
620+ self ,
621+ buf : None = ...,
622+ * ,
623+ column_format : str | None = ...,
624+ position : str | None = ...,
625+ position_float : str | None = ...,
626+ hrules : bool | None = ...,
627+ clines : str | None = ...,
628+ label : str | None = ...,
629+ caption : str | tuple | None = ...,
630+ sparse_index : bool | None = ...,
631+ sparse_columns : bool | None = ...,
632+ multirow_align : str | None = ...,
633+ multicol_align : str | None = ...,
634+ siunitx : bool = ...,
635+ environment : str | None = ...,
636+ encoding : str | None = ...,
637+ convert_css : bool = ...,
638+ ) -> str :
639+ ...
640+
594641 def to_latex (
595642 self ,
596643 buf : FilePath | WriteBuffer [str ] | None = None ,
@@ -610,7 +657,7 @@ def to_latex(
610657 environment : str | None = None ,
611658 encoding : str | None = None ,
612659 convert_css : bool = False ,
613- ):
660+ ) -> str | None :
614661 r"""
615662 Write Styler to a file, buffer or string in LaTeX format.
616663
@@ -1161,6 +1208,46 @@ def to_latex(
11611208 )
11621209 return save_to_buffer (latex , buf = buf , encoding = encoding )
11631210
1211+ @overload
1212+ def to_html (
1213+ self ,
1214+ buf : FilePath | WriteBuffer [str ],
1215+ * ,
1216+ table_uuid : str | None = ...,
1217+ table_attributes : str | None = ...,
1218+ sparse_index : bool | None = ...,
1219+ sparse_columns : bool | None = ...,
1220+ bold_headers : bool = ...,
1221+ caption : str | None = ...,
1222+ max_rows : int | None = ...,
1223+ max_columns : int | None = ...,
1224+ encoding : str | None = ...,
1225+ doctype_html : bool = ...,
1226+ exclude_styles : bool = ...,
1227+ ** kwargs ,
1228+ ) -> None :
1229+ ...
1230+
1231+ @overload
1232+ def to_html (
1233+ self ,
1234+ buf : None = ...,
1235+ * ,
1236+ table_uuid : str | None = ...,
1237+ table_attributes : str | None = ...,
1238+ sparse_index : bool | None = ...,
1239+ sparse_columns : bool | None = ...,
1240+ bold_headers : bool = ...,
1241+ caption : str | None = ...,
1242+ max_rows : int | None = ...,
1243+ max_columns : int | None = ...,
1244+ encoding : str | None = ...,
1245+ doctype_html : bool = ...,
1246+ exclude_styles : bool = ...,
1247+ ** kwargs ,
1248+ ) -> str :
1249+ ...
1250+
11641251 @Substitution (buf = buf , encoding = encoding )
11651252 def to_html (
11661253 self ,
@@ -1178,7 +1265,7 @@ def to_html(
11781265 doctype_html : bool = False ,
11791266 exclude_styles : bool = False ,
11801267 ** kwargs ,
1181- ):
1268+ ) -> str | None :
11821269 """
11831270 Write Styler to a file, buffer or string in HTML-CSS format.
11841271
@@ -1292,18 +1379,46 @@ def to_html(
12921379 html , buf = buf , encoding = (encoding if buf is not None else None )
12931380 )
12941381
1382+ @overload
1383+ def to_string (
1384+ self ,
1385+ buf : FilePath | WriteBuffer [str ],
1386+ * ,
1387+ encoding = ...,
1388+ sparse_index : bool | None = ...,
1389+ sparse_columns : bool | None = ...,
1390+ max_rows : int | None = ...,
1391+ max_columns : int | None = ...,
1392+ delimiter : str = ...,
1393+ ) -> None :
1394+ ...
1395+
1396+ @overload
1397+ def to_string (
1398+ self ,
1399+ buf : None = ...,
1400+ * ,
1401+ encoding = ...,
1402+ sparse_index : bool | None = ...,
1403+ sparse_columns : bool | None = ...,
1404+ max_rows : int | None = ...,
1405+ max_columns : int | None = ...,
1406+ delimiter : str = ...,
1407+ ) -> str :
1408+ ...
1409+
12951410 @Substitution (buf = buf , encoding = encoding )
12961411 def to_string (
12971412 self ,
1298- buf = None ,
1413+ buf : FilePath | WriteBuffer [ str ] | None = None ,
12991414 * ,
13001415 encoding = None ,
13011416 sparse_index : bool | None = None ,
13021417 sparse_columns : bool | None = None ,
13031418 max_rows : int | None = None ,
13041419 max_columns : int | None = None ,
13051420 delimiter : str = " " ,
1306- ):
1421+ ) -> str | None :
13071422 """
13081423 Write Styler to a file, buffer or string in text format.
13091424
0 commit comments