Skip to content

Commit ae8ba12

Browse files
jrm5100Kevin D Smith
authored and
Kevin D Smith
committed
Fix test_unstack (pandas-dev#36987)
1 parent 9b7eece commit ae8ba12

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/tests/extension/base/reshaping.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,9 @@ def test_unstack(self, data, index, obj):
316316
alt = df.unstack(level=level).droplevel(0, axis=1)
317317
self.assert_frame_equal(result, alt)
318318

319-
expected = ser.astype(object).unstack(level=level)
319+
expected = ser.astype(object).unstack(
320+
level=level, fill_value=data.dtype.na_value
321+
)
320322
result = result.astype(object)
321323

322324
self.assert_frame_equal(result, expected)

0 commit comments

Comments
 (0)