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

Method unpickle_block

pandas/core/internals/managers.py:2104–2112  ·  view source on GitHub ↗
(values, mgr_locs, ndim: int)

Source from the content-addressed store, hash-verified

2102
2103 def __setstate__(self, state) -> None:
2104 def unpickle_block(values, mgr_locs, ndim: int) -> Block:
2105 # TODO(EA2D): ndim would be unnecessary with 2D EAs
2106 # older pickles may store e.g. DatetimeIndex instead of DatetimeArray
2107 values = extract_array(values, extract_numpy=True)
2108 if not isinstance(mgr_locs, BlockPlacement):
2109 mgr_locs = BlockPlacement(mgr_locs)
2110
2111 values = maybe_coerce_values(values)
2112 return new_block(values, placement=mgr_locs, ndim=ndim)
2113
2114 if isinstance(state, tuple) and len(state) >= 4 and "0.14.1" in state[3]:
2115 state = state[3]["0.14.1"]

Callers

nothing calls this directly

Calls 3

extract_arrayFunction · 0.90
maybe_coerce_valuesFunction · 0.90
new_blockFunction · 0.90

Tested by

no test coverage detected