(self)
| 31 | |
| 32 | class 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") |
nothing calls this directly
no test coverage detected