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

Method setup

asv_bench/benchmarks/reshape.py:48–52  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

46
47class SimpleReshape:
48 def setup(self):
49 arrays = [np.arange(100).repeat(100), np.roll(np.tile(np.arange(100), 100), 25)]
50 index = MultiIndex.from_arrays(arrays)
51 self.df = DataFrame(np.random.randn(10000, 4), index=index)
52 self.udf = self.df.unstack(1)
53
54 def time_stack(self):
55 self.udf.stack()

Callers

nothing calls this directly

Calls 4

DataFrameClass · 0.90
repeatMethod · 0.45
from_arraysMethod · 0.45
unstackMethod · 0.45

Tested by

no test coverage detected