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

Method arange_result

pandas/core/reshape/reshape.py:246–251  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

244
245 @cache_readonly
246 def arange_result(self) -> tuple[npt.NDArray[np.intp], npt.NDArray[np.bool_]]:
247 # We cache this for reuse in ExtensionBlock._unstack
248 dummy_arr = np.arange(len(self.index), dtype=np.intp)
249 new_values, mask = self.get_new_values(dummy_arr, fill_value=-1)
250 return new_values, mask.any(0)
251 # TODO: in all tests we have mask.any(0).all(); can we rely on that?
252
253 def get_result(self, obj, value_columns, fill_value) -> DataFrame:
254 values = obj._values

Callers

nothing calls this directly

Calls 2

get_new_valuesMethod · 0.95
anyMethod · 0.45

Tested by

no test coverage detected