diff --git a/tests/test_message_meta.py b/tests/test_message_meta.py index 7e225ad6f1..689c0339b1 100644 --- a/tests/test_message_meta.py +++ b/tests/test_message_meta.py @@ -105,9 +105,9 @@ def test_mutable_dataframe(df: cudf.DataFrame): meta = MessageMeta(df) with meta.mutable_dataframe() as df: - df['v2'][3] = 47 + df['v2'].iloc[3] = 47 - assert meta.copy_dataframe()['v2'][3] == 47 + assert meta.copy_dataframe()['v2'].iloc[3] == 47 def test_using_ctx_outside_with_block(df: cudf.DataFrame): @@ -136,5 +136,6 @@ def test_copy_dataframe(df: cudf.DataFrame): assert copied_df is not df, "But should be different instances" # Try setting a single value on the copy - meta.copy_dataframe()['v2'][3] = 47 + cdf = meta.copy_dataframe() + cdf['v2'].iloc[3] = 47 assert assert_df_equal(meta.copy_dataframe(), df), "Should be identical"