@@ -23,41 +23,38 @@ class Factorize:
23
23
"int" ,
24
24
"uint" ,
25
25
"float" ,
26
- "string " ,
26
+ "object " ,
27
27
"datetime64[ns]" ,
28
28
"datetime64[ns, tz]" ,
29
29
"Int64" ,
30
30
"boolean" ,
31
- "string_arrow " ,
31
+ "string[pyarrow] " ,
32
32
],
33
33
]
34
34
param_names = ["unique" , "sort" , "dtype" ]
35
35
36
36
def setup (self , unique , sort , dtype ):
37
37
N = 10 ** 5
38
38
string_index = tm .makeStringIndex (N )
39
- try :
40
- from pandas .core .arrays .string_arrow import ArrowStringDtype
41
-
42
- string_arrow = pd .array (string_index , dtype = ArrowStringDtype ())
43
- except ImportError :
44
- string_arrow = None
45
-
46
- if dtype == "string_arrow" and not string_arrow :
47
- raise NotImplementedError
39
+ string_arrow = None
40
+ if dtype == "string[pyarrow]" :
41
+ try :
42
+ string_arrow = pd .array (string_index , dtype = "string[pyarrow]" )
43
+ except ImportError :
44
+ raise NotImplementedError
48
45
49
46
data = {
50
47
"int" : pd .Int64Index (np .arange (N )),
51
48
"uint" : pd .UInt64Index (np .arange (N )),
52
49
"float" : pd .Float64Index (np .random .randn (N )),
53
- "string " : string_index ,
50
+ "object " : string_index ,
54
51
"datetime64[ns]" : pd .date_range ("2011-01-01" , freq = "H" , periods = N ),
55
52
"datetime64[ns, tz]" : pd .date_range (
56
53
"2011-01-01" , freq = "H" , periods = N , tz = "Asia/Tokyo"
57
54
),
58
55
"Int64" : pd .array (np .arange (N ), dtype = "Int64" ),
59
56
"boolean" : pd .array (np .random .randint (0 , 2 , N ), dtype = "boolean" ),
60
- "string_arrow " : string_arrow ,
57
+ "string[pyarrow] " : string_arrow ,
61
58
}[dtype ]
62
59
if not unique :
63
60
data = data .repeat (5 )
0 commit comments