MCPcopy Create free account
hub / github.com/apache/arrow / setup

Method setup

python/benchmarks/convert_pandas.py:61–66  ·  view source on GitHub ↗
(self, uniqueness, total)

Source from the content-addressed store, hash-verified

59 string_length = 25
60
61 def setup(self, uniqueness, total):
62 nunique = int(total * uniqueness)
63 unique_values = [rands(self.string_length) for i in range(nunique)]
64 values = unique_values * (total // nunique)
65 self.arr = pa.array(values, type=pa.string())
66 self.table = pa.Table.from_arrays([self.arr], ['f0'])
67
68 def time_to_pandas_dedup(self, *args):
69 self.arr.to_pandas()

Callers 1

setupMethod · 0.45

Calls 3

randsFunction · 0.90
arrayMethod · 0.45
stringMethod · 0.45

Tested by

no test coverage detected