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

Method setup

asv_bench/benchmarks/multiindex_object.py:18–28  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

16
17class GetLoc:
18 def setup(self):
19 self.mi_large = MultiIndex.from_product(
20 [np.arange(1000), np.arange(20), list(string.ascii_letters)],
21 names=["one", "two", "three"],
22 )
23 self.mi_med = MultiIndex.from_product(
24 [np.arange(1000), np.arange(10), list("A")], names=["one", "two", "three"]
25 )
26 self.mi_small = MultiIndex.from_product(
27 [np.arange(100), list("A"), list("A")], names=["one", "two", "three"]
28 )
29
30 def time_large_get_loc(self):
31 self.mi_large.get_loc((999, 19, "Z"))

Callers

nothing calls this directly

Calls 1

from_productMethod · 0.80

Tested by

no test coverage detected