Select blocks that are bool-dtype and columns from object-dtype blocks that are all-bool.
(self)
| 678 | return indexer |
| 679 | |
| 680 | def get_bool_data(self) -> Self: |
| 681 | """ |
| 682 | Select blocks that are bool-dtype and columns from object-dtype blocks |
| 683 | that are all-bool. |
| 684 | """ |
| 685 | |
| 686 | new_blocks = [] |
| 687 | |
| 688 | for blk in self.blocks: |
| 689 | if blk.dtype == bool: |
| 690 | new_blocks.append(blk) |
| 691 | |
| 692 | elif blk.is_object: |
| 693 | new_blocks.extend(nb for nb in blk._split() if nb.is_bool) |
| 694 | |
| 695 | return self._combine(new_blocks) |
| 696 | |
| 697 | def get_numeric_data(self) -> Self: |
| 698 | numeric_blocks = [blk for blk in self.blocks if blk.is_numeric] |