diff --git a/pandas/tests/dtypes/test_dtypes.py b/pandas/tests/dtypes/test_dtypes.py index aef61045179ef..e127fe27b6209 100644 --- a/pandas/tests/dtypes/test_dtypes.py +++ b/pandas/tests/dtypes/test_dtypes.py @@ -1140,3 +1140,15 @@ def test_compare_complex_dtypes(): with pytest.raises(TypeError, match=msg): df.lt(df.astype(object)) + + +def test_multi_column_dtype_assignment(): + # GH #27583 + df = pd.DataFrame({"a": [0.0], "b": 0.0}) + expected = pd.DataFrame({"a": [0], "b": 0}) + + df[["a", "b"]] = 0 + tm.assert_frame_equal(df, expected) + + df["b"] = 0 + tm.assert_frame_equal(df, expected)