报错信息:
File "E:/0001CTR/召回算法汇总/EGES/EGES-master/data_process.py", line 32, in get_session
group_action_data = action_data.groupby('user_id').agg(list)
File "D:\Anaconda2\envs\py3\lib\site-packages\pandas\core\groupby.py", line 3597, in aggregate
return super(DataFrameGroupBy, self).aggregate(arg, *args, *kwargs)
File "D:\Anaconda2\envs\py3\lib\site-packages\pandas\core\groupby.py", line 3114, in aggregate
result, how = self._aggregate(arg, _level=_level, args, **kwargs)
File "D:\Anaconda2\envs\py3\lib\site-packages\pandas\core\base.py", line 564, in _aggregate
return self._aggregate_multiple_funcs(arg, _level=_level), None
File "D:\Anaconda2\envs\py3\lib\site-packages\pandas\core\base.py", line 616, in _aggregate_multiple_funcs
return concat(results, keys=keys, axis=1)
File "D:\Anaconda2\envs\py3\lib\site-packages\pandas\tools\merge.py", line 845, in concat
copy=copy)
File "D:\Anaconda2\envs\py3\lib\site-packages\pandas\tools\merge.py", line 878, in init
raise ValueError('No objects to concatenate')
ValueError: No objects to concatenate
def get_session(action_data, use_type=None) 中的group_action_data = action_data.groupby('user_id').agg(list) 为何是agg(list)? agg聚合操作,传入的参数list是不是有误?参数list代码在这一行时候报错了。
报错信息: File "E:/0001CTR/召回算法汇总/EGES/EGES-master/data_process.py", line 32, in get_session group_action_data = action_data.groupby('user_id').agg(list) File "D:\Anaconda2\envs\py3\lib\site-packages\pandas\core\groupby.py", line 3597, in aggregate return super(DataFrameGroupBy, self).aggregate(arg, *args, *kwargs) File "D:\Anaconda2\envs\py3\lib\site-packages\pandas\core\groupby.py", line 3114, in aggregate result, how = self._aggregate(arg, _level=_level, args, **kwargs) File "D:\Anaconda2\envs\py3\lib\site-packages\pandas\core\base.py", line 564, in _aggregate return self._aggregate_multiple_funcs(arg, _level=_level), None File "D:\Anaconda2\envs\py3\lib\site-packages\pandas\core\base.py", line 616, in _aggregate_multiple_funcs return concat(results, keys=keys, axis=1) File "D:\Anaconda2\envs\py3\lib\site-packages\pandas\tools\merge.py", line 845, in concat copy=copy) File "D:\Anaconda2\envs\py3\lib\site-packages\pandas\tools\merge.py", line 878, in init raise ValueError('No objects to concatenate') ValueError: No objects to concatenate