We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ee4012 commit 8b40bebCopy full SHA for 8b40beb
pandas/core/generic.py
@@ -3385,8 +3385,10 @@ def to_latex(
3385
3386
from pandas.io.formats.style import Styler
3387
3388
+ # error: Argument 1 to "Styler" has incompatible type "NDFrame"; expected
3389
+ # "Union[DataFrame, Series]"
3390
styler = Styler(
- self if self.ndim > 1 else self.to_frame(),
3391
+ self, # type: ignore[arg-type]
3392
uuid="",
3393
formatter=formatter,
3394
na_rep=na_rep,
@@ -3397,7 +3399,7 @@ def to_latex(
3397
3399
)
3398
3400
3401
for ax in [0, 1]: #
- fmt: callable | str | None = None
3402
+ fmt: Callable | str | None = None
3403
if isinstance(formatter, dict):
3404
fmt = formatter.get("__index__" if ax == 0 else "__columns__")
3405
styler.format_index(
0 commit comments