@@ -839,6 +839,8 @@ def test_dense_nan_df():
839839
840840 test_dropna (ray_df , pd_df )
841841 test_dropna_inplace (ray_df , pd_df )
842+ test_dropna_multiple_axes (ray_df , pd_df )
843+ test_dropna_multiple_axes_inplace (ray_df , pd_df )
842844
843845
844846@pytest .fixture
@@ -1297,16 +1299,17 @@ def test_drop_duplicates():
12971299
12981300@pytest .fixture
12991301def test_dropna (ray_df , pd_df ):
1300- ray_df_equals_pandas (ray_df .dropna (axis = 1 , how = 'all' ),
1301- pd_df .dropna (axis = 1 , how = 'all' ))
1302+ assert ray_df_equals_pandas (ray_df .dropna (axis = 1 , how = 'all' ),
1303+ pd_df .dropna (axis = 1 , how = 'all' ))
13021304
1303- ray_df_equals_pandas (ray_df .dropna (axis = 1 , how = 'any' ),
1304- pd_df .dropna (axis = 1 , how = 'any' ))
1305+ assert ray_df_equals_pandas (ray_df .dropna (axis = 1 , how = 'any' ),
1306+ pd_df .dropna (axis = 1 , how = 'any' ))
13051307
1306- ray_df_equals_pandas (ray_df .dropna (axis = 0 , how = 'all' ),
1307- pd_df .dropna (axis = 0 , how = 'all' ))
1308+ assert ray_df_equals_pandas (ray_df .dropna (axis = 0 , how = 'all' ),
1309+ pd_df .dropna (axis = 0 , how = 'all' ))
13081310
1309- ray_df_equals_pandas (ray_df .dropna (thresh = 2 ), pd_df .dropna (thresh = 2 ))
1311+ assert ray_df_equals_pandas (ray_df .dropna (thresh = 2 ),
1312+ pd_df .dropna (thresh = 2 ))
13101313
13111314
13121315@pytest .fixture
@@ -1317,12 +1320,43 @@ def test_dropna_inplace(ray_df, pd_df):
13171320 ray_df .dropna (thresh = 2 , inplace = True )
13181321 pd_df .dropna (thresh = 2 , inplace = True )
13191322
1320- ray_df_equals_pandas (ray_df , pd_df )
1323+ assert ray_df_equals_pandas (ray_df , pd_df )
13211324
13221325 ray_df .dropna (axis = 1 , how = 'any' , inplace = True )
13231326 pd_df .dropna (axis = 1 , how = 'any' , inplace = True )
13241327
1325- ray_df_equals_pandas (ray_df , pd_df )
1328+ assert ray_df_equals_pandas (ray_df , pd_df )
1329+
1330+
1331+ @pytest .fixture
1332+ def test_dropna_multiple_axes (ray_df , pd_df ):
1333+ assert ray_df_equals_pandas (
1334+ ray_df .dropna (how = 'all' , axis = [0 , 1 ]),
1335+ pd_df .dropna (how = 'all' , axis = [0 , 1 ])
1336+ )
1337+ assert ray_df_equals_pandas (
1338+ ray_df .dropna (how = 'all' , axis = (0 , 1 )),
1339+ pd_df .dropna (how = 'all' , axis = (0 , 1 ))
1340+ )
1341+
1342+
1343+ @pytest .fixture
1344+ def test_dropna_multiple_axes_inplace (ray_df , pd_df ):
1345+ ray_df_copy = ray_df .copy ()
1346+ pd_df_copy = pd_df .copy ()
1347+
1348+ ray_df_copy .dropna (how = 'all' , axis = [0 , 1 ], inplace = True )
1349+ pd_df_copy .dropna (how = 'all' , axis = [0 , 1 ], inplace = True )
1350+
1351+ assert ray_df_equals_pandas (ray_df_copy , pd_df_copy )
1352+
1353+ ray_df_copy = ray_df .copy ()
1354+ pd_df_copy = pd_df .copy ()
1355+
1356+ ray_df_copy .dropna (how = 'all' , axis = (0 , 1 ), inplace = True )
1357+ pd_df_copy .dropna (how = 'all' , axis = (0 , 1 ), inplace = True )
1358+
1359+ assert ray_df_equals_pandas (ray_df_copy , pd_df_copy )
13261360
13271361
13281362def test_duplicated ():
0 commit comments