Skip to content

TST: implement test to_string_empty_col for Series (GH13653) #36715

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions pandas/tests/io/formats/test_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -2846,6 +2846,19 @@ def test_to_string_multindex_header(self):
exp = " r1 r2\na b \n0 1 2 3"
assert res == exp

@pytest.mark.parametrize(
"data, expected",
(
["", "Hello", "World", "", "", "Mooooo", "", ""],
" \n Hello\n World\n \n \nMooooo\n \n ",
),
)
def test_to_string_empty_col(self, data, expected):
# GH 13653
s = pd.Series(data)
res = s.to_string(index=False)
assert res == expected


class TestGenericArrayFormatter:
def test_1d_array(self):
Expand Down