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

Method setup

asv_bench/benchmarks/join_merge.py:335–342  ·  view source on GitHub ↗
(self, unique_elements)

Source from the content-addressed store, hash-verified

333 param_names = ["unique_elements"]
334
335 def setup(self, unique_elements):
336 N = 1_000_000
337 self.left = DataFrame({"a": np.random.randint(1, unique_elements, (N,))})
338 self.right = DataFrame({"a": np.random.randint(1, unique_elements, (N,))})
339 uniques = self.right.a.drop_duplicates()
340 self.right["a"] = concat(
341 [uniques, Series(np.arange(0, -(N - len(uniques)), -1))], ignore_index=True
342 )
343
344 def time_unique_merge(self, unique_elements):
345 merge(self.left, self.right, how="inner")

Callers

nothing calls this directly

Calls 4

DataFrameClass · 0.90
concatFunction · 0.90
SeriesClass · 0.90
drop_duplicatesMethod · 0.45

Tested by

no test coverage detected