Skip to content

Commit 82f4354

Browse files
authored
TST(string dtype): Resolve to_latex xfail (#60614)
TST(string dtype): Fix to_latex xfail
1 parent 59b3a1a commit 82f4354

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
@@ -1644,7 +1644,7 @@ def _update_ctx_header(self, attrs: DataFrame, axis: AxisInt) -> None:
16441644
for j in attrs.columns:
16451645
ser = attrs[j]
16461646
for i, c in ser.items():
1647-
if not c:
1647+
if not c or pd.isna(c):
16481648
continue
16491649
css_list = maybe_convert_css_to_tuples(c)
16501650
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)