We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c1dfe56 + 7c30ef1 commit 94eaee8Copy full SHA for 94eaee8
pandas/tests/indexing/test_loc.py
@@ -444,6 +444,13 @@ def test_loc_setitem_consistency(self):
444
expected = DataFrame({'date': Series(['string'])})
445
tm.assert_frame_equal(df, expected)
446
447
+ # GH 9336
448
+ expected = DataFrame({'date': [1, 'a', 'b']})
449
+ df = DataFrame({'date': Series(pd.NaT, range(3))})
450
+ df.loc[0, 'date'] = 1
451
+ df.loc[1:2, 'date'] = 'a', 'b'
452
+ tm.assert_frame_equal(df, expected)
453
+
454
def test_loc_setitem_consistency_empty(self):
455
# empty (essentially noops)
456
expected = DataFrame(columns=['x', 'y'])
0 commit comments