pandas.errors.NumbaUtilError #

异常 pandas.errors。NumbaUtilError [来源] #

因不支持的 Numba 引擎例程而引发错误。

例子

>>> df = pd.DataFrame({"key": ["a", "a", "b", "b"], "data": [1, 2, 3, 4]},
...                   columns=["key", "data"])
>>> def incorrect_function(x):
...     return sum(x) * 2.7
>>> df.groupby("key").agg(incorrect_function, engine="numba")
Traceback (most recent call last):
NumbaUtilError: The first 2 arguments to incorrect_function
must be ['values', 'index']