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

Method setup

python/benchmarks/parquet.py:30–41  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

28class ParquetWriteBinary(object):
29
30 def setup(self):
31 nuniques = 100000
32 value_size = 50
33 length = 1000000
34 num_cols = 10
35
36 unique_values = np.array([rands(value_size) for
37 i in range(nuniques)], dtype='O')
38 values = unique_values[np.random.randint(0, nuniques, size=length)]
39 self.table = pa.table([pa.array(values) for i in range(num_cols)],
40 names=[f'f{i}' for i in range(num_cols)])
41 self.table_df = self.table.to_pandas()
42
43 def time_write_binary_table(self):
44 out = pa.BufferOutputStream()

Callers

nothing calls this directly

Calls 2

randsFunction · 0.90
arrayMethod · 0.45

Tested by

no test coverage detected