Skip to content

Commit adf8f99

Browse files
committed
TST: fix bug in get_dummy tests under python3
1 parent 106cd65 commit adf8f99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/tests/reshape/test_reshape.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -397,14 +397,14 @@ def test_dataframe_dummies_prefix_list(self, df, sparse):
397397

398398
def test_dataframe_dummies_prefix_str(self, df, sparse):
399399
# not that you should do this...
400+
df[['C']] = df[['C']].astype(np.uint8)
400401
result = get_dummies(df, prefix='bad', sparse=sparse)
401402
bad_columns = ['bad_a', 'bad_b', 'bad_b', 'bad_c']
402403
expected = DataFrame([[1, 1, 0, 1, 0],
403404
[2, 0, 1, 1, 0],
404405
[3, 1, 0, 0, 1]],
405406
columns=['C'] + bad_columns,
406407
dtype=np.uint8)
407-
expected[['C']] = df[['C']]
408408
assert_frame_equal(result, expected)
409409

410410
def test_dataframe_dummies_subset(self, df, sparse):

0 commit comments

Comments
 (0)