Skip to content

Commit 4c088c3

Browse files
author
Montana Low
committed
add github issue for reference with original reported failure
1 parent f7c0002 commit 4c088c3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pandas/tests/test_strings.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1943,12 +1943,18 @@ def test_split(self):
19431943
[u('f'), u('g'), u('h')]])
19441944
tm.assert_series_equal(result, exp)
19451945

1946-
# expand blank split
1946+
# expand blank split GH 20067
1947+
values = Series([''])
1948+
result = values.str.split(expand=True)
1949+
exp = DataFrame([[]])
1950+
tm.assert_frame_equal(result, exp)
1951+
19471952
values = Series(['a b c', 'a b', '', ' '])
19481953
result = values.str.split(expand=True)
19491954
exp = DataFrame([['a', 'b', 'c'], ['a', 'b', np.nan],
19501955
[np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan]])
1951-
tm.assert_series_equal(result, exp)
1956+
tm.assert_frame_equal(result, exp)
1957+
19521958

19531959
def test_rsplit(self):
19541960
values = Series(['a_b_c', 'c_d_e', NA, 'f_g_h'])

0 commit comments

Comments
 (0)