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 88e7bc2 commit b34cadbCopy full SHA for b34cadb
pandas/tests/io/formats/test_to_markdown.py
@@ -4,9 +4,16 @@
4
5
6
@td.skip_if_no_tabulate
7
-def test_to_markdown():
8
- df = pd.DataFrame([1, 2, 3])
9
- result = df.to_markdown()
10
- assert (
11
- result == "| | 0 |\n|---:|----:|\n| 0 | 1 |\n| 1 | 2 |\n| 2 | 3 |"
12
- )
+class TestToMarkdown:
+ def test_to_markdown(self):
+ df = pd.DataFrame([1, 2, 3])
+ result = df.to_markdown()
+ assert (
+ result
13
+ == "| | 0 |\n|---:|----:|\n| 0 | 1 |\n| 1 | 2 |\n| 2 | 3 |"
14
+ )
15
+
16
+ def test_to_markdown_other_tablefmt(self):
17
18
+ result = df.to_markdown(tablefmt="jira")
19
+ assert result == "|| || 0 ||\n| 0 | 1 |\n| 1 | 2 |\n| 2 | 3 |"
0 commit comments