22
33import pandas as pd
44
5- from .pandas_vb_common import tm
6-
75
86class BooleanArray :
97 def setup (self ):
@@ -56,7 +54,7 @@ def time_from_tuples(self):
5654class StringArray :
5755 def setup (self ):
5856 N = 100_000
59- values = tm . rands_array ( 3 , N )
57+ values = np . array ([ str ( i ) for i in range ( N )], dtype = object )
6058 self .values_obj = np .array (values , dtype = "object" )
6159 self .values_str = np .array (values , dtype = "U" )
6260 self .values_list = values .tolist ()
@@ -80,7 +78,7 @@ def setup(self, multiple_chunks):
8078 import pyarrow as pa
8179 except ImportError :
8280 raise NotImplementedError
83- strings = tm . rands_array ( 3 , 10_000 )
81+ strings = np . array ([ str ( i ) for i in range ( 10_000 )], dtype = object )
8482 if multiple_chunks :
8583 chunks = [strings [i : i + 100 ] for i in range (0 , len (strings ), 100 )]
8684 self .array = pd .arrays .ArrowStringArray (pa .chunked_array (chunks ))
@@ -127,7 +125,7 @@ def setup(self, dtype, hasna):
127125 elif dtype == "int64[pyarrow]" :
128126 data = np .arange (N )
129127 elif dtype == "string[pyarrow]" :
130- data = tm . rands_array ( 10 , N )
128+ data = np . array ([ str ( i ) for i in range ( N )], dtype = object )
131129 elif dtype == "timestamp[ns][pyarrow]" :
132130 data = pd .date_range ("2000-01-01" , freq = "s" , periods = N )
133131 else :
0 commit comments