SpecificationError: nested renamer is not supported
生活随笔
收集整理的這篇文章主要介紹了
SpecificationError: nested renamer is not supported
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
一、問題描述
使用gropuby+agg分組+聚合函數做詞頻統計時,出現SpecificationError: nested renamer is not supported錯誤。
二、解決
出錯代碼為:
words_count=df_all_words.groupby(by=['all_words'])['all_words'].agg({"count":numpy.size})修改為:
words_count=df_all_words.groupby(by=['all_words'])['all_words'].agg([("count","count")])運行結果:
Life is like a box of chocolates, you never know what you are going to get.
總結
以上是生活随笔為你收集整理的SpecificationError: nested renamer is not supported的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 移动web前端框架一、jQuery Mo
- 下一篇: 使用三维扫描方式对船舶发动机舱表面传感器