@@ -352,14 +352,6 @@ def test_assigning_ops(self):
352
352
df .loc [2 :3 , "b" ] = Categorical (["b" , "b" ], categories = ["a" , "b" ])
353
353
tm .assert_frame_equal (df , exp )
354
354
355
- def test_functions_no_warnings (self ):
356
- df = DataFrame ({"value" : np .random .randint (0 , 100 , 20 )})
357
- labels = [f"{ i } - { i + 9 } " for i in range (0 , 100 , 10 )]
358
- with tm .assert_produces_warning (False ):
359
- df ["group" ] = pd .cut (
360
- df .value , range (0 , 105 , 10 ), right = False , labels = labels
361
- )
362
-
363
355
def test_setitem_single_row_categorical (self ):
364
356
# GH 25495
365
357
df = DataFrame ({"Alpha" : ["a" ], "Numeric" : [0 ]})
@@ -394,14 +386,3 @@ def test_loc_indexing_preserves_index_category_dtype(self):
394
386
395
387
result = df .loc [["a" ]].index .levels [0 ]
396
388
tm .assert_index_equal (result , expected )
397
-
398
- def test_categorical_filtering (self ):
399
- # GH22609 Verify filtering operations on DataFrames with categorical Series
400
- df = DataFrame (data = [[0 , 0 ], [1 , 1 ]], columns = ["a" , "b" ])
401
- df ["b" ] = df .b .astype ("category" )
402
-
403
- result = df .where (df .a > 0 )
404
- expected = df .copy ()
405
- expected .loc [0 , :] = np .nan
406
-
407
- tm .assert_equal (result , expected )
0 commit comments