pandas踩坑:nested renamer is not supported python
生活随笔
收集整理的這篇文章主要介紹了
pandas踩坑:nested renamer is not supported python
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
問題描述
在運行df.groupby([‘id’])[‘click’].agg({‘click_std’:‘std’}).reset_index(),得到nested renamer is not supported python錯誤
解決方案
在新的 Pandas 版本中,{‘click_std’:‘std’}這種字典方式已經被拋棄了,改為df.groupby([‘id’])[‘click’].agg(click_std=‘std’).reset_index()后,成功運行。
參考:
總結
以上是生活随笔為你收集整理的pandas踩坑:nested renamer is not supported python的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Java人员岗位职责是什么 职业道路该怎
- 下一篇: 浙江移动“5G智能战士”全力阻击疫情