Skip to content

Commit ae75f35

Browse files
authored
CLN: remove BlockManager.__contains__ (#33293)
1 parent 213822a commit ae75f35

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

Diff for: pandas/core/internals/managers.py

-3
Original file line numberDiff line numberDiff line change
@@ -791,9 +791,6 @@ def get_slice(self, slobj: slice, axis: int = 0) -> "BlockManager":
791791
bm = type(self)(new_blocks, new_axes, do_integrity_check=False)
792792
return bm
793793

794-
def __contains__(self, item) -> bool:
795-
return item in self.items
796-
797794
@property
798795
def nblocks(self) -> int:
799796
return len(self.blocks)

Diff for: pandas/tests/internals/test_internals.py

-4
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,6 @@ def test_duplicate_ref_loc_failure(self):
301301
mgr = BlockManager(blocks, axes)
302302
mgr.iget(1)
303303

304-
def test_contains(self, mgr):
305-
assert "a" in mgr
306-
assert "baz" not in mgr
307-
308304
def test_pickle(self, mgr):
309305

310306
mgr2 = tm.round_trip_pickle(mgr)

0 commit comments

Comments
 (0)