SpecificationError: nested renamer is not supported

出错代码:

word_count = df_all_words.groupby(by=['all_words'])['all_words'].agg({"count":numpy.size})

修改:

word_count = df_all_words.groupby(by=['all_words'])['all_words'].agg([('count','count')])

修改后的结果:

SpecificationError: nested renamer is not supported_第1张图片

 

你可能感兴趣的:(python,数据挖掘,开发语言,自然语言处理)