Skip to content

Commit 2e6fa3d

Browse files
committed
Add testing to setting scalars on frames with no index
1 parent 80e2d95 commit 2e6fa3d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pandas/tests/frame/test_indexing.py

+5
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,11 @@ def test_setitem_empty_frame_with_boolean(self):
721721
df[df > df2] = 47
722722
assert_frame_equal(df, df2)
723723

724+
def test_setitem_scalars_no_index(self):
725+
# GH16823
726+
df = DataFrame()
727+
pytest.raises(ValueError, df.__setitem__, 'foo', 1)
728+
724729
def test_getitem_empty_frame_with_boolean(self):
725730
# Test for issue #11859
726731

0 commit comments

Comments
 (0)