Skip to content

Commit 78b7802

Browse files
authored
CLN: remove redundant LatexFormatter and tests (#52844)
Co-authored-by: JHM Darbyshire (iMac) <[email protected]>
1 parent b548eab commit 78b7802

File tree

3 files changed

+10
-964
lines changed

3 files changed

+10
-964
lines changed

pandas/io/formats/format.py

-32
Original file line numberDiff line numberDiff line change
@@ -1022,38 +1022,6 @@ class DataFrameRenderer:
10221022
def __init__(self, fmt: DataFrameFormatter) -> None:
10231023
self.fmt = fmt
10241024

1025-
def to_latex(
1026-
self,
1027-
buf: FilePath | WriteBuffer[str] | None = None,
1028-
column_format: str | None = None,
1029-
longtable: bool = False,
1030-
encoding: str | None = None,
1031-
multicolumn: bool = False,
1032-
multicolumn_format: str | None = None,
1033-
multirow: bool = False,
1034-
caption: str | tuple[str, str] | None = None,
1035-
label: str | None = None,
1036-
position: str | None = None,
1037-
) -> str | None:
1038-
"""
1039-
Render a DataFrame to a LaTeX tabular/longtable environment output.
1040-
"""
1041-
from pandas.io.formats.latex import LatexFormatter
1042-
1043-
latex_formatter = LatexFormatter(
1044-
self.fmt,
1045-
longtable=longtable,
1046-
column_format=column_format,
1047-
multicolumn=multicolumn,
1048-
multicolumn_format=multicolumn_format,
1049-
multirow=multirow,
1050-
caption=caption,
1051-
label=label,
1052-
position=position,
1053-
)
1054-
string = latex_formatter.to_string()
1055-
return save_to_buffer(string, buf=buf, encoding=encoding)
1056-
10571025
def to_html(
10581026
self,
10591027
buf: FilePath | WriteBuffer[str] | None = None,

0 commit comments

Comments
 (0)