我在pycharm中用pylint检查代码,发现下面这个函数检查的时候,会报错:
RecursionError: maximum recursion depth exceeded while calling a Python object.
但是,我写其他的代码检查都是正常的结果,为什么呢?
下面是pylint出错函数的代码:
def sum_number(data_group):
total = data_group['数量(个)'].sum()
return pd.Series({'总数量': total})
# 这是一个输入pandas.Dataframe,输出pandas.Series的函数。