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

Method setup

asv_bench/benchmarks/eval.py:44–53  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

42
43class Query:
44 def setup(self):
45 N = 10**6
46 halfway = (N // 2) - 1
47 index = pd.date_range("20010101", periods=N, freq="min")
48 s = pd.Series(index)
49 self.ts = s.iloc[halfway]
50 self.df = pd.DataFrame({"a": np.random.randn(N), "dates": index}, index=index)
51 data = np.random.randn(N)
52 self.min_val = data.min()
53 self.max_val = data.max()
54
55 def time_query_datetime_index(self):
56 self.df.query("index < @self.ts")

Callers

nothing calls this directly

Calls 2

minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected