Skip to content

Commit ff5b29e

Browse files
author
y-p
committed
TST: HTMLFormatter does not die on unicode frame GH6098
1 parent da59b11 commit ff5b29e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/tests/test_format.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,14 @@ def test_to_html_index_formatter(self):
719719
</table>"""
720720
self.assertEquals(result, expected)
721721

722+
def test_to_html_regression_GH6098(self):
723+
df = DataFrame({u('clé1'): [u('a'), u('a'), u('b'), u('b'), u('a')],
724+
u('clé2'): [u('1er'), u('2ème'), u('1er'), u('2ème'), u('1er')],
725+
'données1': np.random.randn(5),
726+
'données2': np.random.randn(5)})
727+
# it works
728+
df.pivot_table(rows=[u('clé1')], cols=[u('clé2')])._repr_html_()
729+
722730
def test_nonunicode_nonascii_alignment(self):
723731
df = DataFrame([["aa\xc3\xa4\xc3\xa4", 1], ["bbbb", 2]])
724732
rep_str = df.to_string()

0 commit comments

Comments
 (0)