pycharm pandas 经典报错 pandas.core.base.SpecificationError: nested renamer is not supported
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                pycharm pandas 经典报错 pandas.core.base.SpecificationError: nested renamer is not supported
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.                        
                                文章目錄
- 前言
 - pandas.core.base.SpecificationError: nested renamer is not supported 報錯代碼段 && 解決方案
 - 報錯及代碼段
 - 解決方案
 - ??吐司 + 芝士 === 簡單的快樂 ,sincerely,end.
 
前言
??為了統(tǒng)計詞頻,出現(xiàn)的報錯,最終成功解決,如有錯誤,請糾正,萬分感謝!
pandas.core.base.SpecificationError: nested renamer is not supported 報錯代碼段 && 解決方案
報錯及代碼段
報錯:raise SpecificationError("nested renamer is not supported") pandas.core.base.SpecificationError: nested renamer is not supported
 ??代碼段:
解決方案
??參考了博主的文章之后,發(fā)現(xiàn)NoteBook中支持{ }的寫法,但是pycharm里不支持,需要用數(shù)組的方式,即[(),(),… ]
??修改后的代碼段:
words_stat = words_df.groupby(by=['segment'])['segment'].agg([("計數(shù)",np.size)])??成功,無報錯! 參考鏈接
??吐司 + 芝士 === 簡單的快樂 ,sincerely,end.
總結
以上是生活随笔為你收集整理的pycharm pandas 经典报错 pandas.core.base.SpecificationError: nested renamer is not supported的全部內容,希望文章能夠幫你解決所遇到的問題。
                            
                        - 上一篇: 如何搭建属于 “数据业务”的指标体系?
 - 下一篇: loadView、viewDidLoad