Manager analogue of Series.to_frame
(self, columns: Index)
| 2063 | return cls(block, index) |
| 2064 | |
| 2065 | def to_2d_mgr(self, columns: Index) -> BlockManager: |
| 2066 | """ |
| 2067 | Manager analogue of Series.to_frame |
| 2068 | """ |
| 2069 | blk = self.blocks[0] |
| 2070 | arr = ensure_block_shape(blk.values, ndim=2) |
| 2071 | bp = BlockPlacement(0) |
| 2072 | new_blk = type(blk)(arr, placement=bp, ndim=2, refs=blk.refs) |
| 2073 | axes = [columns, self.axes[0].view()] |
| 2074 | return BlockManager([new_blk], axes=axes, verify_integrity=False) |
| 2075 | |
| 2076 | def _has_no_reference(self, i: int = 0) -> bool: |
| 2077 | """ |
no test coverage detected