Skip to content

Commit

Permalink
CLN: remove BlockManager.__contains__ (#33293)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel authored Apr 5, 2020
1 parent 213822a commit ae75f35
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
3 changes: 0 additions & 3 deletions pandas/core/internals/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -791,9 +791,6 @@ def get_slice(self, slobj: slice, axis: int = 0) -> "BlockManager":
bm = type(self)(new_blocks, new_axes, do_integrity_check=False)
return bm

def __contains__(self, item) -> bool:
return item in self.items

@property
def nblocks(self) -> int:
return len(self.blocks)
Expand Down
4 changes: 0 additions & 4 deletions pandas/tests/internals/test_internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,6 @@ def test_duplicate_ref_loc_failure(self):
mgr = BlockManager(blocks, axes)
mgr.iget(1)

def test_contains(self, mgr):
assert "a" in mgr
assert "baz" not in mgr

def test_pickle(self, mgr):

mgr2 = tm.round_trip_pickle(mgr)
Expand Down

0 comments on commit ae75f35

Please # to comment.