Skip to content

Commit 94eaee8

Browse files
committed
Merge branch '9336-df-mix-dt64-tests' of github.com:jcontesti/pandas into 9336-df-mix-dt64-tests
2 parents c1dfe56 + 7c30ef1 commit 94eaee8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pandas/tests/indexing/test_loc.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,13 @@ def test_loc_setitem_consistency(self):
444444
expected = DataFrame({'date': Series(['string'])})
445445
tm.assert_frame_equal(df, expected)
446446

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+
447454
def test_loc_setitem_consistency_empty(self):
448455
# empty (essentially noops)
449456
expected = DataFrame(columns=['x', 'y'])

0 commit comments

Comments
 (0)