MCPcopy
hub / github.com/pandas-dev/pandas / new_block_2d

Function new_block_2d

pandas/core/internals/blocks.py:2247–2257  ·  view source on GitHub ↗
(
    values: ArrayLike, placement: BlockPlacement, refs: BlockValuesRefs | None = None
)

Source from the content-addressed store, hash-verified

2245
2246
2247def new_block_2d(
2248 values: ArrayLike, placement: BlockPlacement, refs: BlockValuesRefs | None = None
2249) -> Block:
2250 # new_block specialized to case with
2251 # ndim=2
2252 # isinstance(placement, BlockPlacement)
2253 # check_ndim/ensure_block_shape already checked
2254 klass = get_block_type(values.dtype)
2255
2256 values = maybe_coerce_values(values)
2257 return klass(values, ndim=2, placement=placement, refs=refs)
2258
2259
2260def new_block(

Callers 12

ndarray_to_mgrFunction · 0.90
_make_na_blockMethod · 0.90
isetMethod · 0.90
_iset_split_blockMethod · 0.90
_iset_singleMethod · 0.90
insertMethod · 0.90
_merge_blocksFunction · 0.90
concatenate_managersFunction · 0.90
_unstackMethod · 0.85
quantileMethod · 0.85

Calls 2

get_block_typeFunction · 0.85
maybe_coerce_valuesFunction · 0.85

Tested by

no test coverage detected