Skip to content

Commit

Permalink
TST(string dtype): Resolve to_latex xfail (#60614)
Browse files Browse the repository at this point in the history
TST(string dtype): Fix to_latex xfail
  • Loading branch information
rhshadrach authored Dec 29, 2024
1 parent 59b3a1a commit 82f4354
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion pandas/io/formats/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -1644,7 +1644,7 @@ def _update_ctx_header(self, attrs: DataFrame, axis: AxisInt) -> None:
for j in attrs.columns:
ser = attrs[j]
for i, c in ser.items():
if not c:
if not c or pd.isna(c):
continue
css_list = maybe_convert_css_to_tuples(c)
if axis == 0:
Expand Down
3 changes: 0 additions & 3 deletions pandas/tests/io/formats/style/test_to_latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import numpy as np
import pytest

from pandas._config import using_string_dtype

from pandas import (
DataFrame,
MultiIndex,
Expand Down Expand Up @@ -731,7 +729,6 @@ def test_longtable_caption_label(styler, caption, cap_exp, label, lab_exp):
)


@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)", strict=False)
@pytest.mark.parametrize("index", [True, False])
@pytest.mark.parametrize(
"columns, siunitx",
Expand Down

0 comments on commit 82f4354

Please sign in to comment.