pandas.errors.NumbaUtilError#
- exception 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']