Skip to content

Commit fb075b5

Browse files
Backport PR #60614 on branch 2.3.x (TST(string dtype): Resolve to_latex xfail) (#60617)
Backport PR #60614: TST(string dtype): Resolve to_latex xfail Co-authored-by: Richard Shadrach <[email protected]>
1 parent e350f10 commit fb075b5

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

pandas/io/formats/style.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1580,7 +1580,7 @@ def _update_ctx_header(self, attrs: DataFrame, axis: AxisInt) -> None:
15801580
for j in attrs.columns:
15811581
ser = attrs[j]
15821582
for i, c in ser.items():
1583-
if not c:
1583+
if not c or pd.isna(c):
15841584
continue
15851585
css_list = maybe_convert_css_to_tuples(c)
15861586
if axis == 0:

pandas/tests/io/formats/style/test_to_latex.py

-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import numpy as np
44
import pytest
55

6-
from pandas._config import using_string_dtype
7-
86
from pandas import (
97
DataFrame,
108
MultiIndex,
@@ -731,7 +729,6 @@ def test_longtable_caption_label(styler, caption, cap_exp, label, lab_exp):
731729
)
732730

733731

734-
@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)", strict=False)
735732
@pytest.mark.parametrize("index", [True, False])
736733
@pytest.mark.parametrize(
737734
"columns, siunitx",

0 commit comments

Comments
 (0)