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 74889fc commit d8d2b62Copy full SHA for d8d2b62
pandas/tests/io/formats/test_to_latex.py
@@ -3,7 +3,7 @@
3
import pytest
4
5
import pandas as pd
6
-from pandas import DataFrame, compat
+from pandas import DataFrame, compat, Series
7
from pandas.util import testing as tm
8
from pandas.compat import u
9
import codecs
@@ -491,3 +491,18 @@ def test_to_latex_decimal(self, frame):
491
"""
492
493
assert withindex_result == withindex_expected
494
+
495
+ def test_to_latex_series(self):
496
+ s = Series(['a', 'b', 'c'])
497
+ withindex_result = s.to_latex()
498
+ withindex_expected = r"""\begin{tabular}{ll}
499
+\toprule
500
+{} & 0 \\
501
+\midrule
502
+0 & a \\
503
+1 & b \\
504
+2 & c \\
505
+\bottomrule
506
+\end{tabular}
507
+"""
508
+ assert withindex_result == withindex_expected
0 commit comments