2
2
3
3
import pandas as pd
4
4
5
- from .pandas_vb_common import tm
6
-
7
5
8
6
class BooleanArray :
9
7
def setup (self ):
@@ -56,7 +54,7 @@ def time_from_tuples(self):
56
54
class StringArray :
57
55
def setup (self ):
58
56
N = 100_000
59
- values = tm . rands_array ( 3 , N )
57
+ values = np . array ([ str ( i ) for i in range ( N )], dtype = object )
60
58
self .values_obj = np .array (values , dtype = "object" )
61
59
self .values_str = np .array (values , dtype = "U" )
62
60
self .values_list = values .tolist ()
@@ -80,7 +78,7 @@ def setup(self, multiple_chunks):
80
78
import pyarrow as pa
81
79
except ImportError :
82
80
raise NotImplementedError
83
- strings = tm . rands_array ( 3 , 10_000 )
81
+ strings = np . array ([ str ( i ) for i in range ( 10_000 )], dtype = object )
84
82
if multiple_chunks :
85
83
chunks = [strings [i : i + 100 ] for i in range (0 , len (strings ), 100 )]
86
84
self .array = pd .arrays .ArrowStringArray (pa .chunked_array (chunks ))
@@ -127,7 +125,7 @@ def setup(self, dtype, hasna):
127
125
elif dtype == "int64[pyarrow]" :
128
126
data = np .arange (N )
129
127
elif dtype == "string[pyarrow]" :
130
- data = tm . rands_array ( 10 , N )
128
+ data = np . array ([ str ( i ) for i in range ( N )], dtype = object )
131
129
elif dtype == "timestamp[ns][pyarrow]" :
132
130
data = pd .date_range ("2000-01-01" , freq = "s" , periods = N )
133
131
else :
0 commit comments