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

Method setup

asv_bench/benchmarks/timeseries.py:164–171  ·  view source on GitHub ↗
(self, index, freq, method)

Source from the content-addressed store, hash-verified

162 param_names = ["index", "freq", "method"]
163
164 def setup(self, index, freq, method):
165 indexes = {
166 "period": period_range(start="1/1/2000", end="1/1/2001", freq="min"),
167 "datetime": date_range(start="1/1/2000", end="1/1/2001", freq="min"),
168 }
169 idx = indexes[index]
170 ts = Series(np.random.randn(len(idx)), index=idx)
171 self.resample = getattr(ts.resample(freq), method)
172
173 def time_resample(self, index, freq, method):
174 self.resample()

Callers

nothing calls this directly

Calls 4

period_rangeFunction · 0.90
date_rangeFunction · 0.90
SeriesClass · 0.90
resampleMethod · 0.45

Tested by

no test coverage detected