@@ -57,7 +57,7 @@ def func_numba(values, index):
57
57
func_numba = numba .jit (func_numba )
58
58
59
59
data = DataFrame (
60
- {0 : ["a" , "a" , "b" , "b" , "a" ], 1 : [1.0 , 2.0 , 3.0 , 4.0 , 5.0 ]}, columns = [0 , 1 ],
60
+ {0 : ["a" , "a" , "b" , "b" , "a" ], 1 : [1.0 , 2.0 , 3.0 , 4.0 , 5.0 ]}, columns = [0 , 1 ]
61
61
)
62
62
engine_kwargs = {"nogil" : nogil , "parallel" : parallel , "nopython" : nopython }
63
63
grouped = data .groupby (0 )
@@ -90,7 +90,7 @@ def func_2(values, index):
90
90
func_2 = numba .jit (func_2 )
91
91
92
92
data = DataFrame (
93
- {0 : ["a" , "a" , "b" , "b" , "a" ], 1 : [1.0 , 2.0 , 3.0 , 4.0 , 5.0 ]}, columns = [0 , 1 ],
93
+ {0 : ["a" , "a" , "b" , "b" , "a" ], 1 : [1.0 , 2.0 , 3.0 , 4.0 , 5.0 ]}, columns = [0 , 1 ]
94
94
)
95
95
engine_kwargs = {"nogil" : nogil , "parallel" : parallel , "nopython" : nopython }
96
96
grouped = data .groupby (0 )
@@ -121,7 +121,7 @@ def func_1(values, index):
121
121
return np .mean (values ) - 3.4
122
122
123
123
data = DataFrame (
124
- {0 : ["a" , "a" , "b" , "b" , "a" ], 1 : [1.0 , 2.0 , 3.0 , 4.0 , 5.0 ]}, columns = [0 , 1 ],
124
+ {0 : ["a" , "a" , "b" , "b" , "a" ], 1 : [1.0 , 2.0 , 3.0 , 4.0 , 5.0 ]}, columns = [0 , 1 ]
125
125
)
126
126
grouped = data .groupby (0 )
127
127
expected = grouped .agg (func_1 , engine = "numba" )
@@ -142,7 +142,7 @@ def func_1(values, index):
142
142
)
143
143
def test_multifunc_notimplimented (agg_func ):
144
144
data = DataFrame (
145
- {0 : ["a" , "a" , "b" , "b" , "a" ], 1 : [1.0 , 2.0 , 3.0 , 4.0 , 5.0 ]}, columns = [0 , 1 ],
145
+ {0 : ["a" , "a" , "b" , "b" , "a" ], 1 : [1.0 , 2.0 , 3.0 , 4.0 , 5.0 ]}, columns = [0 , 1 ]
146
146
)
147
147
grouped = data .groupby (0 )
148
148
with pytest .raises (NotImplementedError , match = "Numba engine can" ):
0 commit comments