Skip to content

Commit 0fc20dd

Browse files
authored
TST: implement test to_string_empty_col for Series (GH13653) (#36715)
1 parent 1aa9fe0 commit 0fc20dd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pandas/tests/io/formats/test_format.py

+7
Original file line numberDiff line numberDiff line change
@@ -2846,6 +2846,13 @@ def test_to_string_multindex_header(self):
28462846
exp = " r1 r2\na b \n0 1 2 3"
28472847
assert res == exp
28482848

2849+
def test_to_string_empty_col(self):
2850+
# GH 13653
2851+
s = pd.Series(["", "Hello", "World", "", "", "Mooooo", "", ""])
2852+
res = s.to_string(index=False)
2853+
exp = " \n Hello\n World\n \n \nMooooo\n \n "
2854+
assert re.match(exp, res)
2855+
28492856

28502857
class TestGenericArrayFormatter:
28512858
def test_1d_array(self):

0 commit comments

Comments
 (0)