From 9e7b7ca5cfbe01e6b4ba2dac96f9a9b9de0f138e Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Wed, 21 Apr 2021 17:05:35 -0700 Subject: [PATCH] Add test. --- python/cudf/cudf/tests/test_dataframe.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/cudf/cudf/tests/test_dataframe.py b/python/cudf/cudf/tests/test_dataframe.py index f068d02d575..810eabdf699 100644 --- a/python/cudf/cudf/tests/test_dataframe.py +++ b/python/cudf/cudf/tests/test_dataframe.py @@ -1070,6 +1070,13 @@ def test_dataframe_setitem_index_len1(): np.testing.assert_equal(gdf.b.to_array(), [0]) +def test_empty_dataframe_setitem_df(): + gdf1 = cudf.DataFrame() + gdf2 = cudf.DataFrame({"a": [1, 2, 3, 4, 5]}) + gdf1["a"] = gdf2["a"] + assert_eq(gdf1, gdf2) + + def test_assign(): gdf = cudf.DataFrame({"x": [1, 2, 3]}) gdf2 = gdf.assign(y=gdf.x + 1)