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

Method setup

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

Source from the content-addressed store, hash-verified

31
32class Pivot:
33 def setup(self):
34 N = 10000
35 index = date_range("1/1/2000", periods=N, freq="h")
36 data = {
37 "value": np.random.randn(N * 50),
38 "variable": np.arange(50).repeat(N),
39 "date": np.tile(index.values, 50),
40 }
41 self.df = DataFrame(data)
42
43 def time_reshape_pivot_time_series(self):
44 self.df.pivot(index="date", columns="variable", values="value")

Callers

nothing calls this directly

Calls 3

date_rangeFunction · 0.90
DataFrameClass · 0.90
repeatMethod · 0.45

Tested by

no test coverage detected